aboutsummaryrefslogtreecommitdiffstats
path: root/del-service
diff options
context:
space:
mode:
Diffstat (limited to 'del-service')
-rwxr-xr-xdel-service3
1 files changed, 2 insertions, 1 deletions
diff --git a/del-service b/del-service
index 881bb99..c95f992 100755
--- a/del-service
+++ b/del-service
@@ -26,6 +26,7 @@ options=--quiet
[ -x /bin/systemctl -a -r /lib/systemd/system/${srv}.service ] && systemd=yes
[ -r /etc/rc.d/init.d/${srv} ] && sysv=yes
[ $sysv = yes ] && options="$options --no-reload"
+unit=${srv}.service
if [ $num = 0 ]; then
# Will be redirected to systemd if needed
@@ -35,7 +36,7 @@ if [ $num = 0 ]; then
# support for systemd. chkconfig will do daemon-reload for us
if [ $systemd = yes ]; then
- /bin/systemctl $options disable ${srv}.service
+ /bin/systemctl $options disable ${unit}
fi
if [ $sysv = yes ]; then
/sbin/chkconfig --del $srv