hook-scripts: fix S30Samba scripts on systemd systems

/etc/init.d/smb does not exist on systemd systems.
Using "service smb <COMMAND>" is the portable way.
It calls init scripts on sysv systems, and redirects
to systemctl on systemd systems.

Change-Id: I7146c9998a51d8b170d3321f3477e92704ae7615
BUG: 1290604
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-on: http://review.gluster.org/12945
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Michael Adam 2015-12-11 00:37:13 +01:00 committed by Niels de Vos
parent 692ccdbd4d
commit ce3ff7e328
3 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ function sighup_samba () {
then
kill -HUP "$pid";
else
/etc/init.d/smb condrestart
service smb condrestart
fi
}

View File

@ -82,7 +82,7 @@ function sighup_samba () {
then
kill -HUP "$pid";
else
/etc/init.d/smb condrestart
service smb condrestart
fi
}

View File

@ -61,7 +61,7 @@ function sighup_samba () {
then
kill -HUP $pid;
else
/etc/init.d/smb condrestart
service smb condrestart
fi
}