mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
3849802497
shfmt -f packaging/ | xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Feb 24 10:13:36 UTC 2022 on sn-devel-184
21 lines
549 B
Bash
Executable File
21 lines
549 B
Bash
Executable File
#!/bin/sh
|
|
SYSTEMCTL=/bin/systemctl
|
|
winbind_is_active=$($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=$($SYSTEMCTL is-active nmb.service)
|
|
if test "${nmb_is_active}" = "active"; then
|
|
$SYSTEMCTL try-restart nmb.service || :
|
|
fi
|
|
/usr/bin/smbcontrol winbind online || :
|
|
;;
|
|
down)
|
|
/usr/bin/smbcontrol winbind offline
|
|
;;
|
|
esac
|