Other init scripts in Buildroot use start()/stop() instead of
do_start()/do_stop(), so change it here as well for consistency
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
# Sanity checks
test -f $DAEMON || exit 0
-do_start() {
+start() {
echo -n "Starting $NAME: "
start-stop-daemon --start --quiet --background --exec $DAEMON \
-- $DAEMON_ARGS \
&& echo "OK" || echo "FAIL"
}
-do_stop() {
+stop() {
echo -n "Stopping $NAME: "
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
&& echo "OK" || echo "FAIL"
case "$1" in
start)
- do_start
+ start
;;
stop)
- do_stop
+ stop
;;
restart)
- do_stop
+ stop
sleep 1
- do_start
+ start
;;
*)
echo "Usage: $0 {start|stop|restart}"