diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:20:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:20:02 +0000 |
commit | 0a354ad0b2c9eaaa204c31db478da109dc6d2a8b (patch) | |
tree | 2467caa8ad20a7fca31bef64224e41a4238db0c9 /debian/samba-common.postinst | |
parent | Adding upstream version 2:4.20.0+dfsg. (diff) | |
download | samba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.tar.xz samba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.zip |
Adding debian version 2:4.20.0+dfsg-1~exp1.debian/2%4.20.0+dfsg-1_exp1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/samba-common.postinst')
-rw-r--r-- | debian/samba-common.postinst | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/samba-common.postinst b/debian/samba-common.postinst new file mode 100644 index 0000000..1877c78 --- /dev/null +++ b/debian/samba-common.postinst @@ -0,0 +1,27 @@ +#!/bin/sh +set -e + +CONFIG=/etc/samba/smb.conf + +if [ "$1" = configure ]; then + if ! dpkg-statoverride --list /var/log/samba >/dev/null; then + # Set some reasonable default perms for the samba logdir + # to hide sensitive information + chmod 0750 /var/log/samba + chown root:adm /var/log/samba + fi + + ucf --three-way --debconf-ok /usr/share/samba/smb.conf "$CONFIG" + + if [ ! -e "$CONFIG" ]; then + echo "Install/upgrade will fail. To recover, please try:" + echo " sudo cp /usr/share/samba/smb.conf $CONFIG" + echo " sudo dpkg --configure -a" + else + ucfr samba-common "$CONFIG" + chmod a+r "$CONFIG" + fi + +fi + +#DEBHELPER# |