]>
git.proxmox.com Git - corosync-pve.git/blob - debian/corosync-notifyd.init
4 # Provides: corosync-notifyd
5 # Required-Start: $network $remote_fs $syslog corosync
6 # Required-Stop: $network $remote_fs $syslog corosync
9 # Default-Start: 2 3 4 5
11 # Short-Description: corosync notifying daemon
12 # Description: Manages the notification daemon of the Corosync Cluster Engine.
15 # Author: Fabio M. Di Nitto <fabbione@ubuntu.com>
17 # PATH should only include /usr/* if it runs after the mountnfs.sh script
18 PATH
=/usr
/sbin
:/usr
/bin
:/sbin
:/bin
19 DESC
="corosync notifying daemon"
21 DAEMON
=/usr
/sbin
/$NAME
22 PIDFILE
=/var
/run
/$NAME.pid
23 SCRIPTNAME
=/etc
/init.d
/$NAME
24 PIDFILE
=/var
/run
/corosync.pid
25 RARUNDIR
=/var
/run
/resource-agents
27 # Exit if the package is not installed
28 [ -x "$DAEMON" ] ||
exit 0
30 # Read configuration variable file if it is present
31 [ -r /etc
/default
/corosync-notifyd
] && .
/etc
/default
/corosync-notifyd
33 # Define LSB log_* functions.
34 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
35 .
/lib
/lsb
/init-functions
38 # Function that starts the daemon/service
43 # 0 if daemon has been started
44 # 1 if daemon was already running
45 # 2 if daemon could not be started
46 start-stop-daemon
--start --quiet --exec $DAEMON --test > /dev
/null \
48 start-stop-daemon
--start --quiet --exec $DAEMON -- $OPTIONS \
50 # Add code here, if necessary, that waits for the process to be ready
51 # to handle requests from services started subsequently which depend
52 # on this one. As a last resort, sleep for some time.
53 pidof
$DAEMON > $PIDFILE
57 # Function that stops the daemon/service
62 # 0 if daemon has been stopped
63 # 1 if daemon was already stopped
64 # 2 if daemon could not be stopped
65 # other if a failure occurred
66 start-stop-daemon
--stop --quiet --retry forever
/QUIT
/1 --pidfile $PIDFILE
68 [ "$RETVAL" = 2 ] && return 2
69 # Many daemons don't delete their pidfiles when they exit.
76 log_daemon_msg
"Starting $DESC" "$NAME"
84 log_daemon_msg
"Stopping $DESC" "$NAME"
92 log_daemon_msg
"Restarting $DESC" "$NAME"
99 1) log_end_msg
1 ;; # Old process is still running
100 *) log_end_msg
1 ;; # Failed to start
110 status_of_proc
-p $PIDFILE $DAEMON $NAME && exit 0 ||
exit $?
113 #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
114 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2