talloc:guide: fix documented signature of talloc_unlink().
[Samba.git] / packaging / NetworkManager / 30-winbind-systemd
blob9db422afea0241748799954d71d76fa8644e457c
1 #!/bin/sh
2 SYSTEMCTL=/bin/systemctl
3 winbind_is_active=$($SYSTEMCTL is-active winbind.service)
4 test "${winbind_is_active}" = "active" || exit 0
6 winbind_offline_logon=$(testparm -s --parameter-name "winbind offline logon" 2>/dev/null)
7 test "${winbind_offline_logon}" = "Yes" || exit 0
9 case "$2" in
10 up|vpn-up)
11 nmb_is_active=$($SYSTEMCTL is-active nmb.service)
12 if test "${nmb_is_active}" = "active"; then
13 $SYSTEMCTL try-restart nmb.service || :
15 /usr/bin/smbcontrol winbind online || :
17 down)
18 /usr/bin/smbcontrol winbind offline
20 esac