1#!/bin/sh 2# 3# Starts babeld. 4# 5 6# Allow a few customizations from a config file 7test -r /etc/default/babeld && . /etc/default/babeld 8 9start() { 10 printf "Starting babeld: " 11 start-stop-daemon -S -q -p /run/babeld.pid \ 12 --exec /usr/sbin/babeld -- $DAEMON_ARGS 13 [ $? = 0 ] && echo "OK" || echo "FAIL" 14} 15stop() { 16 printf "Stopping babeld: " 17 start-stop-daemon -K -q -p /run/babeld.pid 18 [ $? = 0 ] && echo "OK" || echo "FAIL" 19} 20restart() { 21 stop 22 start 23} 24 25case "$1" in 26 start) 27 start 28 ;; 29 stop) 30 stop 31 ;; 32 restart|reload) 33 restart 34 ;; 35 *) 36 echo "Usage: $0 {start|stop|restart}" 37 exit 1 38esac 39 40exit $? 41