#!/usr/bin/env /lib/init/init-d-script ### BEGIN INIT INFO # Provides: bcron-sched # Should-Start: $syslog # Required-Start: $time $local_fs # Required-Stop: $time $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: bcron system scheduler ### END INIT INFO NAME='bcron-start' DESC='bcron system scheduler' DAEMON=/usr/sbin/bcron-start # daemon_ () { /usr/bin/daemon --noconfig --name "${NAME}" "$@"; } daemon_ () { /usr/bin/daemon --noconfig "$@"; } if ! test -x '/usr/bin/daemon' ; then log_failure_msg "install \`daemon' package to use ${NAME} script" exit 1 fi do_start_cmd_override () { daemon_ "${DAEMON}" } do_stop_cmd_override () { PID=$(ps ax | grep -v "${DAEMON}" | grep -v grep | awk '{print $1}') kill -KILL ${PID} } # vim: ft=sh