aboutsummaryrefslogtreecommitdiffstats
path: root/add-service
diff options
context:
space:
mode:
Diffstat (limited to 'add-service')
-rwxr-xr-xadd-service8
1 files changed, 5 insertions, 3 deletions
diff --git a/add-service b/add-service
index 40e3985..cee3b14 100755
--- a/add-service
+++ b/add-service
@@ -174,7 +174,9 @@ check_sysvinit_service() {
}
if [ $num = 1 ]; then
# First install mode
- [ "null" != "$units" ] && add_service
+ if [ "null" != "$units" ]; then
+ add_service
+ fi
else
# Upgrade mode.
reloaded=no
@@ -278,8 +280,8 @@ else
/bin/systemctl --quiet try-restart $iunit
done
fi
- else
- [ "null" != "$unit" ] && /bin/systemctl --quiet try-restart $unit
+ elif [ "null" != "$unit" ]; then
+ /bin/systemctl --quiet try-restart $unit
fi
done
elif [ -f /etc/rc.d/init.d/$srv ]; then