Some Linux distributions don't have a "service" compatibility command.
To avoid breaking working systems, prefer the "service" compatibility
command just in case it does some extra, unexpected magic.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Kai Blin <kai@samba.org>
$_nice /sbin/service "$_service_name" "$_op"
elif [ -x /usr/sbin/service ]; then
$_nice /usr/sbin/service "$_service_name" "$_op"
+ elif [ -x /bin/systemctl ]; then
+ $_nice /bin/systemctl "$_op" "$_service_name"
elif [ -x $CTDB_SYS_ETCDIR/init.d/$_service_name ]; then
$_nice $CTDB_SYS_ETCDIR/init.d/$_service_name "$_op"
elif [ -x $CTDB_SYS_ETCDIR/rc.d/init.d/$_service_name ]; then