aboutsummaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rwxr-xr-xservice14
1 files changed, 10 insertions, 4 deletions
diff --git a/service b/service
index 8e9ceaad..0a6d297b 100755
--- a/service
+++ b/service
@@ -1,11 +1,10 @@
#!/bin/sh
-VERSION="`basename $0` ver. 0.9"
+VERSION="`basename $0` ver. 0.91"
USAGE="Usage: `basename $0` < option > | --status-all | \
-[ service_name [ command ] ]"
+[ service_name [ command | --full-restart ] ]"
SERVICE=
SERVICEDIR="/etc/rc.d/init.d"
-PWD=`pwd`
if [ $# -eq 0 ]; then
echo "${USAGE}" >&2
@@ -38,8 +37,15 @@ do
;;
esac
done
- cd "${PWD}"
exit 0
+ elif [ $# -eq 2 -a "${2}" = "--full-restart" ]; then
+ SERVICE="${1}"
+ cd "${SERVICEDIR}"
+ if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
+ "${SERVICEDIR}/${SERVICE}" stop
+ "${SERVICEDIR}/${SERVICE}" start
+ exit $?
+ fi
elif [ -z "${SERVICE}" ]; then
SERVICE="${1}"
else