packages: daemontools/svscan.upstart (NEW) - add upstart rule
glen
glen at pld-linux.org
Thu Jan 27 19:30:41 CET 2011
Author: glen Date: Thu Jan 27 18:30:41 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- add upstart rule
---- Files affected:
packages/daemontools:
svscan.upstart (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/daemontools/svscan.upstart
diff -u /dev/null packages/daemontools/svscan.upstart:1.1
--- /dev/null Thu Jan 27 19:30:41 2011
+++ packages/daemontools/svscan.upstart Thu Jan 27 19:30:36 2011
@@ -0,0 +1,27 @@
+description "svscan (scan and run services)"
+
+start on local-filesystems
+stop on pld.shutdown-started
+
+respawn
+console output
+
+env SVSCAN_DIR="/service"
+
+pre-start script
+ test -w "$SVSCAN_DIR"
+end script
+
+exec /usr/sbin/svscan $SVSCAN_DIR
+
+post-stop script
+ # bring everything down, svscan maybe forgot some
+ for s in $SVSCAN_DIR/*{,/log}/run; do
+ if [ -x "$s" ]; then
+ svc="$svc ${s%/run}"
+ fi
+ done
+ if [ "$svc" ]; then
+ svc -d -x $svc
+ fi
+end script
================================================================
More information about the pld-cvs-commit
mailing list