#!/usr/share/ucs-test/runner bash
# shellcheck shell=bash
## desc: "Winbind restart test"
## exposure: dangerous
## packages:
##  - winbind
##  - univention-samba

# shellcheck source=../../lib/base.sh
. "$TESTLIBPATH/base.sh" || exit 137

wbinfo -p || exit 137

/etc/init.d/winbind restart

sleep 3;

wbinfo -p || fail_test 110

killall -STOP winbindd

/etc/init.d/winbind restart
sleep 3;
wbinfo -p || fail_test 110

/etc/init.d/winbind stop
/etc/init.d/winbind start

exit $RETVAL
