aboutsummaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rwxr-xr-xservice6
1 files changed, 1 insertions, 5 deletions
diff --git a/service b/service
index 1a426356..6f179347 100755
--- a/service
+++ b/service
@@ -7,7 +7,6 @@ USAGE="Usage: $(basename $0) < option > | --status-all | \
[ service_name [ command | --full-restart ] ]"
SERVICE=
SERVICEDIR="/etc/init.d"
-SYSTEMDSERVICEDIR="/lib/systemd/system"
OPTIONS=
if [ $# -eq 0 ]; then
@@ -69,10 +68,7 @@ done
if [ -f "${SERVICEDIR}/${SERVICE}" ]; then
env -i PATH="$PATH" TERM="$TERM" SYSTEMCTL_IGNORE_DEPENDENCIES=${SYSTEMCTL_IGNORE_DEPENDENCIES} SYSTEMCTL_SKIP_REDIRECT=${SYSTEMCTL_SKIP_REDIRECT} "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
-elif [ -f "${SYSTEMDSERVICEDIR}/${SERVICE}.service" ]; then
+else
echo $"Redirecting to /bin/systemctl ${OPTIONS} ${SERVICE}.service" >/dev/stderr
exec /bin/systemctl ${OPTIONS} ${SERVICE}.service
-else
- echo $"${SERVICE}: unrecognized service" >&2
- exit 1
fi