mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-11-07 19:31:58 +01:00
fix backup, systemd-resolved
This commit is contained in:
parent
fbe274117f
commit
3ce6d7c2ae
@ -193,3 +193,7 @@ elif [[ $service == "zmb-ad-join" ]]; then
|
|||||||
pct set $LXC_NBR -nameserver "${LXC_IP%/*} $LXC_DNS"
|
pct set $LXC_NBR -nameserver "${LXC_IP%/*} $LXC_DNS"
|
||||||
fi
|
fi
|
||||||
pct start $LXC_NBR
|
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
|
@ -124,7 +124,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# stop + disable samba services and remove default config
|
# 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/samba/smb.conf
|
||||||
rm -f /etc/krb5.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
|
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
rc=0
|
rc=0
|
||||||
keep=$1
|
keep=\$1
|
||||||
if \$1 ; then
|
|
||||||
keep=\$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p /${LXC_SHAREFS_MOUNTPOINT}/{online,offline}
|
mkdir -p /${LXC_SHAREFS_MOUNTPOINT}/{online,offline}
|
||||||
|
|
||||||
@ -198,6 +195,4 @@ cat << EOF > /etc/logrotate.d/smb-backup
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
smb-backup 7
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
Loading…
Reference in New Issue
Block a user