SOURCES: webapps.sh - webapp modules support

glen glen at pld-linux.org
Mon Dec 5 19:53:12 CET 2005


Author: glen                         Date: Mon Dec  5 18:53:12 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- webapp modules support

---- Files affected:
SOURCES:
   webapps.sh (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SOURCES/webapps.sh
diff -u SOURCES/webapps.sh:1.5 SOURCES/webapps.sh:1.6
--- SOURCES/webapps.sh:1.5	Sun Nov 20 20:05:16 2005
+++ SOURCES/webapps.sh	Mon Dec  5 19:53:07 2005
@@ -4,23 +4,34 @@
 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
 }
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/webapps.sh?r1=1.5&r2=1.6&f=u




More information about the pld-cvs-commit mailing list