3
# Start and stop pwrkap service
4
# (C) Copyright IBM Corp. 2008
8
# Required-Start: $network $remote_fs
9
# Required-Stop: $remote_fs $network
10
# Default-Start: 2 3 4 5
12
# Short-Description: pwrkap initscript
13
# Description: This script take care of starting and stopping the
17
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
19
[ -x /usr/bin/pwrkap_main ] || exit 0
21
. /lib/lsb/init-functions
24
DAEMON="/usr/bin/pwrkap_main"
25
PIDFILE="/var/run/$NAME.pid"
29
log_daemon_msg "Starting $NAME energy cap daemon" "$NAME"
30
start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON >/dev/null
38
log_daemon_msg "Stopping $NAME energy cap daemon" "$NAME"
39
if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE; then
46
start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
49
status_of_proc -p $PIDFILE /usr/lib/$NAME/pwrkap_main.py $NAME && exit 0 || exit $?
52
echo "Usage: $0 {start|stop|restart|force-reload|status}"