slitaz-tools rev 827
Add startd + stopd: small wrapper to start/stop daemons
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Jan 22 18:33:16 2014 +0100 (2014-01-22) |
parents | 4ae085ee5bb3 |
children | ee8e6af11d45 |
files | Makefile tinyutils/startd tinyutils/stopd |
line diff
1.1 --- a/Makefile Sun Jan 19 14:20:00 2014 +0100 1.2 +++ b/Makefile Wed Jan 22 18:33:16 2014 +0100 1.3 @@ -93,7 +93,8 @@ 1.4 done; 1.5 1.6 # /usr/bin tools. 1.7 - for app in tazx startx history editor browser terminal file-manager decode frugal; \ 1.8 + for app in tazx startx history editor browser terminal file-manager \ 1.9 + decode frugal startd stopd; \ 1.10 do \ 1.11 install -m 0755 tinyutils/$$app $(DESTDIR)$(PREFIX)/bin; \ 1.12 done;
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/tinyutils/startd Wed Jan 22 18:33:16 2014 +0100 2.3 @@ -0,0 +1,14 @@ 2.4 +#!/bin/sh 2.5 +# 2.6 +# Startd - Small wrapper to start daemons on SliTaz. 2.7 +# 2.8 +. /lib/libtaz.sh 2.9 +check_root 2.10 + 2.11 +[ ! "$1" ] && echo "Usage: startd [daemon]" && exit 0 2.12 + 2.13 +if [ -x /etc/init.d/$1 ]; then 2.14 + /etc/init.d/$1 start 2.15 +fi 2.16 + 2.17 +exit 0
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/tinyutils/stopd Wed Jan 22 18:33:16 2014 +0100 3.3 @@ -0,0 +1,14 @@ 3.4 +#!/bin/sh 3.5 +# 3.6 +# Stopd - Small wrapper to stop daemons on SliTaz. 3.7 +# 3.8 +. /lib/libtaz.sh 3.9 +check_root 3.10 + 3.11 +[ ! "$1" ] && echo "Usage: stopd [daemon]" && exit 0 3.12 + 3.13 +if [ -x /etc/init.d/$1 ]; then 3.14 + /etc/init.d/$1 stop 3.15 +fi 3.16 + 3.17 +exit 0