aboutsummaryrefslogtreecommitdiffstats
path: root/del-service
diff options
context:
space:
mode:
Diffstat (limited to 'del-service')
-rwxr-xr-xdel-service8
1 files changed, 5 insertions, 3 deletions
diff --git a/del-service b/del-service
index 388add9..55c26bf 100755
--- a/del-service
+++ b/del-service
@@ -87,15 +87,17 @@ if [ $num = 0 ]; then
if [ -z "$DURING_INSTALL" ]; then
if [ x$init = xsystemd ]; then
- /bin/systemctl stop $units
+ /bin/systemctl stop $units >/dev/null 2>&1
elif [ -n "srv" ]; then
/sbin/service $srv stop > /dev/null || :
fi
fi
/bin/systemctl --no-reload --quiet disable $units >/dev/null 2>&1
- if [ -n "$srv" -a -f /etc/rc.d/init.d/$srv ]; then
- /sbin/chkconfig --del $srv
+ if [ -n "$srv" ]; then
+ if [ -f /etc/rc.d/init.d/$srv -o -f /etc/xinetd.d/$srv ]; then
+ /sbin/chkconfig --del $srv
+ fi
fi
fi