smbd: Fix bug 9549 -- Memleak in the async echo handler
[Samba/gebeck_regimport.git] / packaging / NetworkManager / 30-winbind-systemd
blobaf0edf97471d45194073e99cbc9c7a24014c7e5f
1 #!/bin/sh
3 winbind_is_active=$(/bin/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=$(/bin/systemctl is-active nmb.service)
12 if test "${nmb_is_active}" = "active"; then
13 /bin/systemctl try-restart nmb.service || :
15 /usr/bin/smbcontrol winbind online || :
17 down)
18 /usr/bin/smbcontrol winbind offline
20 esac