blob: af0edf97471d45194073e99cbc9c7a24014c7e5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
winbind_is_active=$(/bin/systemctl is-active winbind.service)
test "${winbind_is_active}" = "active" || exit 0
winbind_offline_logon=$(testparm -s --parameter-name "winbind offline logon" 2>/dev/null)
test "${winbind_offline_logon}" = "Yes" || exit 0
case "$2" in
up|vpn-up)
nmb_is_active=$(/bin/systemctl is-active nmb.service)
if test "${nmb_is_active}" = "active"; then
/bin/systemctl try-restart nmb.service || :
fi
/usr/bin/smbcontrol winbind online || :
;;
down)
/usr/bin/smbcontrol winbind offline
;;
esac
|