samba/debian/samba-common-bin.postinst

17 lines
420 B
Bash

#!/bin/sh
set -e
SERVER_ROLE=`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1`
if [ "$SERVER_ROLE" = "active directory domain controller" ]; then
echo "Checking smb.conf with samba-tool"
samba-tool testparm -d1 --suppress-prompt > /dev/null
echo "Done"
else
echo "Checking smb.conf with testparm"
testparm -d1 --suppress-prompt > /dev/null
echo "Done"
fi
#DEBHELPER#