httpd="$2"
app="$3"
+webapp_link() {
+ echo "$1" | tr '/' '-'
+}
+
webapp_register() {
- ln -sf $webapps/$app/$httpd.conf /etc/$httpd/webapps.d/$app.conf
+ local link=$(webapp_link $app)
+ ln -sf $webapps/$app/$httpd.conf /etc/$httpd/webapps.d/$link.conf
}
webapp_unregister() {
- rm -f /etc/$httpd/webapps.d/$app.conf
+ local link=$(webapp_link $app)
+ rm -f /etc/$httpd/webapps.d/$link.conf
}
usage() {
cat >&2 <<EOF
Usage: $0 register httpd webapp
+Usage: $0 register httpd webapp/module
Usage: $0 unregister httpd webapp
+Usage: $0 unregister httpd webapp/module
Where httpd is one of the webservers
apache 1.x: apache
apache 2.x: httpd
lighttpd: lighttpd
+
+webapp modules are supported,
+drupal tinymce module webapp name would be drupal/tinymce.
EOF
}