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