X-Git-Url: https://pd.if.org/git/?p=startuptools;a=blobdiff_plain;f=scripts%2Fexample.rc;h=5853e975bfd3613e4a86cfa0f7ea17be188ae273;hp=b72880c6da0d843680fc7d256b163d6493569c05;hb=02792f665ba30af4fa356a076cf438f338028a6e;hpb=768f8e25908f5bcecb5283f864650c279568c5ae diff --git a/scripts/example.rc b/scripts/example.rc index b72880c..5853e97 100755 --- a/scripts/example.rc +++ b/scripts/example.rc @@ -1,16 +1,23 @@ #!/bin/sh +. /etc/rc.d/functions.rc . /etc/rc.conf case "$1" in start) - exit 0 + status_starting $0 + /bin/true + status_check ;; stop) - exit 0; + status_stopping $0 + /bin/true + status_check ;; restart) - exit 0; + status_begin restarting $0 + $0 stop && sleep 1 && $0 start + status_check ;; status) exit 0; @@ -19,3 +26,5 @@ case "$1" in echo "usage: $0 {start | stop | restart | status }" exit 1 esac + +exit $?