Commit 0e97eccf authored by Vitaly Lipatov's avatar Vitaly Lipatov

prefer to use init script directly

parent b6bed3c3
......@@ -30,7 +30,12 @@ serv_common()
sudocmd /etc/init.d/$SERVICE "$@"
;;
systemd)
sudocmd systemctl "$@" $SERVICE
# run init script directly (for nonstandart commands)
if [ -x /etc/init.d/$SERVICE ] ; then
sudocmd /etc/init.d/$SERVICE "$@"
else
sudocmd systemctl "$@" $SERVICE
fi
;;
*)
fatal "Have no suitable command for $SERVICETYPE"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment