%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/thread-self/root/var/lib/dpkg/info/
Upload File :
Create Path :
Current File : //proc/thread-self/root/var/lib/dpkg/info/samba-common-bin.postinst

#!/bin/sh

set -e

# systemd-tmpfiles should be called before testparm
# See https://bugs.debian.org/975422

# Automatically added by dh_installtmpfiles/13.6ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	# In case this system is running systemd, we need to ensure that all
	# necessary tmpfiles (if any) are created before starting.
	if [ -z "${DPKG_ROOT:-}" ] && [ -d /run/systemd/system ] ; then
		systemd-tmpfiles --create samba.conf >/dev/null || true
	fi
fi
# End automatically added section


if [ "$1" = "configure" ] ; then
    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
fi

Zerion Mini Shell 1.0