summaryrefslogtreecommitdiffstats
path: root/tools/crm_mon.upstart.in
blob: eb4c956c64e9fd1cdf48c701302f8be6d273e5d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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