diff options
Diffstat (limited to 'tools/crm_mon.upstart.in')
-rw-r--r-- | tools/crm_mon.upstart.in | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/crm_mon.upstart.in b/tools/crm_mon.upstart.in new file mode 100644 index 0000000..eb4c956 --- /dev/null +++ b/tools/crm_mon.upstart.in @@ -0,0 +1,35 @@ +# crm_mon - Daemon for pacemaker monitor +# +# + +kill timeout 3600 +respawn +respawn limit 10 3600 + +expect fork + +env prog=crm_mon +env sysconf=@CONFIGDIR@/crm_mon +env rpm_lockdir=@localstatedir@/lock/subsys +env deb_lockdir=@localstatedir@/lock + + +script + [ -f "$sysconf" ] && . "$sysconf" + exec $prog $OPTIONS +end script + +post-start script + [ -f "$sysconf" ] && . "$sysconf" + [ -z "$LOCK_FILE" -a -d "$rpm_lockdir" ] && LOCK_FILE="$rpm_lockdir/$prog" + [ -z "$LOCK_FILE" -a -d "$deb_lockdir" ] && LOCK_FILE="$deb_lockdir/$prog" + touch "$LOCK_FILE" +end script + +post-stop script + [ -f "$sysconf" ] && . "$sysconf" + [ -z "$LOCK_FILE" -a -d "$rpm_lockdir" ] && LOCK_FILE="$rpm_lockdir/$prog" + [ -z "$LOCK_FILE" -a -d "$deb_lockdir" ] && LOCK_FILE="$deb_lockdir/$prog" + rm -f "$LOCK_FILE" +end script + |