fix backup, systemd-resolved

This commit is contained in:
thorstenspille 2023-10-29 22:58:18 +01:00
parent fbe274117f
commit 3ce6d7c2ae
2 changed files with 6 additions and 7 deletions

View File

@ -193,3 +193,7 @@ elif [[ $service == "zmb-ad-join" ]]; then
pct set $LXC_NBR -nameserver "${LXC_IP%/*} $LXC_DNS"
fi
pct start $LXC_NBR
if [[ $service == "zmb-ad" ]] || [[ $service == "zmb-ad-join" ]]; then
sleep 5
pct exec $LXC_NBR /usr/local/bin/smb-backup 7
fi

View File

@ -124,7 +124,7 @@ EOF
fi
# stop + disable samba services and remove default config
systemctl disable --now smbd nmbd winbind systemd-resolved
systemctl disable --now smbd nmbd winbind systemd-resolved > /dev/null 2>&1
rm -f /etc/samba/smb.conf
rm -f /etc/krb5.conf
@ -146,10 +146,7 @@ cat << EOF > /usr/local/bin/smb-backup
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
rc=0
keep=$1
if \$1 ; then
keep=\$1
fi
keep=\$1
mkdir -p /${LXC_SHAREFS_MOUNTPOINT}/{online,offline}
@ -198,6 +195,4 @@ cat << EOF > /etc/logrotate.d/smb-backup
}
EOF
smb-backup 7
exit 0