aboutsummaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rwxr-xr-xservice9
1 files changed, 5 insertions, 4 deletions
diff --git a/service b/service
index 38d54a25..e178362a 100755
--- a/service
+++ b/service
@@ -11,6 +11,7 @@ if [ $# -eq 0 ]; then
exit 1
fi
+cd /
while [ $# -gt 0 ]
do
case "${1}" in
@@ -32,7 +33,7 @@ do
;;
*)
if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
- "${SERVICEDIR}/${SERVICE}" status
+ env -i "${SERVICEDIR}/${SERVICE}" status
fi
;;
esac
@@ -42,8 +43,8 @@ do
SERVICE="${1}"
cd "${SERVICEDIR}"
if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
- "${SERVICEDIR}/${SERVICE}" stop
- "${SERVICEDIR}/${SERVICE}" start
+ env -i "${SERVICEDIR}/${SERVICE}" stop
+ env -i "${SERVICEDIR}/${SERVICE}" start
exit $?
fi
elif [ -z "${SERVICE}" ]; then
@@ -57,7 +58,7 @@ do
done
if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
- "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
+ env -i "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
else
echo $"${SERVICE}: unrecognized service" >&2
exit 1