mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-12-25 11:40:12 +01:00
Added zamba-standalone.sh
This commit is contained in:
parent
5fa4ddd585
commit
3f436fff77
39
zmb-standalone.sh
Normal file
39
zmb-standalone.sh
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Authors:
|
||||||
|
# (C) 2021 Idea an concept by Christian Zengel <christian@sysops.de>
|
||||||
|
# (C) 2021 Script design and prototype by Markus Helmke <helmke@cloudistboese.de>
|
||||||
|
# (C) 2021 Script rework and documentation by Thorsten Spille <thorsten@spille-edv.de>
|
||||||
|
|
||||||
|
# configure system language
|
||||||
|
dpkg-reconfigure locales
|
||||||
|
|
||||||
|
source /root/zamba.conf
|
||||||
|
|
||||||
|
# Set Timezone
|
||||||
|
ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime
|
||||||
|
|
||||||
|
apt update
|
||||||
|
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade
|
||||||
|
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" $LXC_TOOLSET acl samba samba-dsdb-modules samba-vfs-modules
|
||||||
|
|
||||||
|
smbpasswd -x $ZMB_ADMIN_USER
|
||||||
|
(echo $ZMB_ADMIN_PASS; echo $ZMB_ADMIN_PASS) | smbpasswd -a $ZMB_ADMIN_USER
|
||||||
|
|
||||||
|
cat << EOF >> /etc/samba/smb.conf
|
||||||
|
[share]
|
||||||
|
comment = Main Share
|
||||||
|
path = /tank/share
|
||||||
|
read only = No
|
||||||
|
vfs objects = shadow_copy2
|
||||||
|
shadow: snapdir = .zfs/snapshot
|
||||||
|
shadow: sort = desc
|
||||||
|
shadow: format = -%Y-%m-%d-%H%M
|
||||||
|
shadow: snapprefix = ^zfs-auto-snap_\(frequent\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(monthly\)\{0,1\}
|
||||||
|
shadow: delimiter = -20
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo chmod -R 770 /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||||
|
sudo chown -R '$ZMB_ADMIN_USER':root /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||||
|
|
||||||
|
systemctl restart smbd nmbd winbind
|
Loading…
Reference in New Issue
Block a user