SOURCES: webapps.sh - don't try to perform (un)register if checkco...

gotar gotar at pld-linux.org
Fri Jan 6 16:10:02 CET 2006


Author: gotar                        Date: Fri Jan  6 15:10:02 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- don't try to perform (un)register if checkconfig fails

---- Files affected:
SOURCES:
   webapps.sh (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: SOURCES/webapps.sh
diff -u SOURCES/webapps.sh:1.9 SOURCES/webapps.sh:1.10
--- SOURCES/webapps.sh:1.9	Fri Jan  6 16:03:07 2006
+++ SOURCES/webapps.sh	Fri Jan  6 16:09:56 2006
@@ -69,7 +69,7 @@
 checkconfig() {
 	if [ -z "$httpd" ] || [ -z "$app" ]; then
 		usage
-		return
+		return 1
 	fi
 
 	# sanity check
@@ -83,12 +83,10 @@
 
 case "$action" in
 register)
-	checkconfig
-	webapp_register
+	checkconfig && webapp_register
 	;;
 unregister)
-	checkconfig
-	webapp_unregister
+	checkconfig && webapp_unregister
 	;;
 list)
 	webapp_list $2
================================================================

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



More information about the pld-cvs-commit mailing list