]> git.pld-linux.org Git - packages/webapps.git/blame - webapps.sh
- use $httpd to be organized
[packages/webapps.git] / webapps.sh
CommitLineData
e9689537
ER
1#!/bin/sh
2webapps=/etc/webapps
3action="$1"
f21ce9bd 4httpd="$2"
e9689537
ER
5app="$3"
6
7webapp_register() {
f21ce9bd 8 ln -sf $webapps/$app/$httpd.conf /etc/$httpd/webapps/$app.conf
e9689537
ER
9}
10
11webapp_unregister() {
f21ce9bd 12 rm -f /etc/$httpd/webapps/$app.conf
e9689537
ER
13}
14
15usage() {
16 cat >&2 <<EOF
f21ce9bd
ER
17Usage: $0 register httpd webapp
18Usage: $0 unregister httpd webapp
19
20Where httpd one of the webservers
21apache 1.x: apache
22apache 2.x: httpd
23lighttpd: lighttpd
e9689537
ER
24EOF
25}
26
27case "$action" in
28register)
d91deb44 29 webapp_register
e9689537
ER
30 ;;
31unregister)
d91deb44 32 webapp_unregister
e9689537
ER
33 ;;
34*)
35 usage
36 exit 1
37esac
This page took 0.084243 seconds and 4 git commands to generate.