Author: glen Date: Tue Dec 6 12:59:14 2005 GMT Module: SOURCES Tag: HEAD ---- Log message: - implemented webapp list command
---- Files affected: SOURCES: webapps.sh (1.6 -> 1.7) ---- Diffs: ================================================================ Index: SOURCES/webapps.sh diff -u SOURCES/webapps.sh:1.6 SOURCES/webapps.sh:1.7 --- SOURCES/webapps.sh:1.6 Mon Dec 5 19:53:07 2005 +++ SOURCES/webapps.sh Tue Dec 6 13:59:08 2005 @@ -1,5 +1,6 @@ #!/bin/sh webapps=/etc/webapps +webservers='apache httpd lighttpd' action="$1" httpd="$2" app="$3" @@ -18,6 +19,19 @@ rm -f /etc/$httpd/webapps.d/$link.conf } +webapp_list() { + echo "registered webapps${1:+ for $1}": + for server in ${1:-$webservers}; do + [ -d /etc/$server/webapps.d ] || continue + echo "$server:" + for conf in /etc/$server/webapps.d/*; do + [ -L $conf ] || continue + app=$(readlink $conf | sed -e "s,$webapps/,,;s,/$server.conf$,,") + echo "- $app" + done + done +} + usage() { cat >&2 <<EOF Usage: $0 register httpd webapp @@ -58,6 +72,9 @@ unregister) checkconfig webapp_unregister + ;; +list) + webapp_list $2 ;; *) usage ================================================================ ---- CVS-web: http://cvs.pld-linux.org/SOURCES/webapps.sh?r1=1.6&r2=1.7&f=u _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit