SOURCES: daemontools.init - add try-restart/force-reload
glen
glen at pld-linux.org
Sun Apr 27 02:34:04 CEST 2008
Author: glen Date: Sun Apr 27 00:34:04 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- add try-restart/force-reload
---- Files affected:
SOURCES:
daemontools.init (1.16 -> 1.17)
---- Diffs:
================================================================
Index: SOURCES/daemontools.init
diff -u SOURCES/daemontools.init:1.16 SOURCES/daemontools.init:1.17
--- SOURCES/daemontools.init:1.16 Sun Apr 27 02:22:17 2008
+++ SOURCES/daemontools.init Sun Apr 27 02:33:58 2008
@@ -57,7 +57,7 @@
svc=$(echo $SVSCAN_DIR/*)
if [ "$svc" != "$SVSCAN_DIR/*" ]; then
svc -d -x $SVSCAN_DIR/* \
- $(find $SVSCAN_DIR/* -maxdepth 0 -follow -perm -1000|sed s-\$-/log-)
+ $(find $SVSCAN_DIR/* -maxdepth 0 -follow -perm -1000 | sed -e 's-\$-/log-')
fi
rm -f /var/run/svscan.pid /var/lock/subsys/svscan >/dev/null 2>&1
else
@@ -65,6 +65,16 @@
fi
}
+condrestart() {
+ if [ -f /var/lock/subsys/svscan ]; then
+ stop
+ start
+ else
+ msg_not_running svscan
+ RETVAL=$1
+ fi
+}
+
RETVAL=0
# See how we were called.
case "$1" in
@@ -78,12 +88,18 @@
stop
start
;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
status)
status svscan
exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/daemontools.init?r1=1.16&r2=1.17&f=u
More information about the pld-cvs-commit
mailing list