diff options
author | Roman I Khimov <khimov@altell.ru> | 2010-03-19 16:37:02 +0300 |
---|---|---|
committer | Roman I Khimov <khimov@altell.ru> | 2010-03-20 00:06:05 +0300 |
commit | 6476a15dfce24c23af3a08cb6e07ce962c167b19 (patch) | |
tree | 31f51489e2c68c248f825ecc42f3d513487677f8 /recipes/dnsmasq/files | |
parent | e399e99d2594c68ed0405368d52eb1b2c16bf3c8 (diff) | |
download | openembedded-6476a15dfce24c23af3a08cb6e07ce962c167b19.tar.gz |
dnsmasq: add status check to init file
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes/dnsmasq/files')
-rw-r--r-- | recipes/dnsmasq/files/init | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/recipes/dnsmasq/files/init b/recipes/dnsmasq/files/init index d05a5aaf83..6f1fd320da 100644 --- a/recipes/dnsmasq/files/init +++ b/recipes/dnsmasq/files/init @@ -20,6 +20,18 @@ case "$1" in start-stop-daemon -K -x $DAEMON echo "done." ;; + status) + echo -n "dnsmasq " + start-stop-daemon -q -K -t -x $DAEMON + RET=$? + if [ "$RET" == "0" ]; then + PID=`cat /var/run/dnsmasq.pid` + echo "($PID) is running" + else + echo "is not running" + exit $RET + fi + ;; restart) echo "restarting $DESC: $NAME... " $0 stop @@ -32,7 +44,7 @@ case "$1" in echo "done." ;; *) - echo "Usage: $0 {start|stop|restart|reload}" + echo "Usage: $0 {start|stop|status|restart|reload}" exit 1 ;; esac |