Debian Codegraph @

debian/contrib/sysvinit/bcron-sched

raw
1 #!/usr/bin/env /lib/init/init-d-script
2 ### BEGIN INIT INFO
3 # Provides: bcron-sched
4 # Should-Start: $syslog
5 # Required-Start: $time $local_fs
6 # Required-Stop: $time $local_fs
7 # Default-Start: 2 3 4 5
8 # Default-Stop: 0 1 6
9 # Short-Description: bcron system scheduler
10 ### END INIT INFO
11 NAME='bcron-start'
12 DESC='bcron system scheduler'
13 DAEMON=/usr/sbin/bcron-start
14
15 # daemon_ () { /usr/bin/daemon --noconfig --name "${NAME}" "$@"; }
16 daemon_ () { /usr/bin/daemon --noconfig "$@"; }
17
18 if ! test -x '/usr/bin/daemon' ; then
19 log_failure_msg "install \`daemon' package to use ${NAME} script"
20 exit 1
21 fi
22
23 do_start_cmd_override () {
24 daemon_ "${DAEMON}"
25 }
26
27 do_stop_cmd_override () {
28 PID=$(ps ax | grep -v "${DAEMON}" | grep -v grep | awk '{print $1}')
29 kill -KILL ${PID}
30 }
31
32 # vim: ft=sh