forked from bashclub/zamba-lxc-toolbox
Renamed FILEFS vars to SHAREFS
This commit is contained in:
parent
2a02e79f43
commit
c02558dfe9
@ -72,7 +72,7 @@ select opt in just_lxc zmb-standalone zmb-member zmb-pdc mailpiler matrix quit;
|
||||
;;
|
||||
zmb-member)
|
||||
echo "Configuring LXC container '$opt'!"
|
||||
pct set $LXC_NBR -mp0 $LXC_FILEFS_STORAGE:$LXC_FILEFS_SIZE,mp=/$LXC_FILEFS_MOUNTPOINT
|
||||
pct set $LXC_NBR -mp0 $LXC_SHAREFS_STORAGE:$LXC_SHAREFS_SIZE,mp=/$LXC_SHAREFS_MOUNTPOINT
|
||||
sleep 2;
|
||||
break
|
||||
;;
|
||||
|
@ -15,13 +15,13 @@
|
||||
LXC_TEMPLATE_STORAGE="local"
|
||||
|
||||
# Define the size and storage location of the container's root filesystem
|
||||
LXC_ROOTFS_SIZE="100"
|
||||
LXC_ROOTFS_SIZE="32"
|
||||
LXC_ROOTFS_STORAGE="local-zfs"
|
||||
|
||||
# Define the size, storage location and mountpoint of the container's shared filesystem (required for 'zmb_standalone' and 'zmb_member')
|
||||
LXC_FILEFS_SIZE="100"
|
||||
LXC_FILEFS_STORAGE="local-zfs"
|
||||
LXC_FILEFS_MOUNTPOINT="tank"
|
||||
LXC_SHAREFS_SIZE="100"
|
||||
LXC_SHAREFS_STORAGE="local-zfs"
|
||||
LXC_SHAREFS_MOUNTPOINT="tank"
|
||||
|
||||
# Define whether the container will be created in unprivileged (1) or privileged (0) mode
|
||||
# For 'zmb_standalone', 'zmb_pdc', 'zmb_member' and 'mailpiler' the container needs to be created with 'unprivileged=0'
|
||||
|
@ -78,7 +78,7 @@ cat > /etc/samba/smb.conf <<EOF
|
||||
|
||||
[$ZMB_SHARE]
|
||||
comment = Main Share
|
||||
path = /$LXC_FILEFS_MOUNTPOINT/$ZMB_SHARE
|
||||
path = /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||
read only = No
|
||||
create mask = 0660
|
||||
directory mask = 0770
|
||||
@ -99,13 +99,13 @@ systemctl restart winbind nmbd
|
||||
wbinfo -u
|
||||
wbinfo -g
|
||||
|
||||
mkdir /$LXC_FILEFS_MOUNTPOINT/$ZMB_SHARE
|
||||
mkdir /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||
|
||||
# originally 'domain users' was set, added variable for domain admins group, samba wiki recommends separate group e.g. 'unix admins'
|
||||
chown "$ZMB_ADMIN_USER":"$ZMB_DOMAIN_ADMINS_GROUP" /$LXC_FILEFS_MOUNTPOINT/$ZMB_SHARE
|
||||
chown "$ZMB_ADMIN_USER":"$ZMB_DOMAIN_ADMINS_GROUP" /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||
|
||||
setfacl -Rm u:$ZMB_ADMIN_USER:rwx,g::-,o::- /$LXC_FILEFS_MOUNTPOINT/$ZMB_SHARE
|
||||
setfacl -Rdm u:$ZMB_ADMIN_USER:rwx,g::-,o::- /$LXC_FILEFS_MOUNTPOINT/$ZMB_SHARE
|
||||
setfacl -Rm u:$ZMB_ADMIN_USER:rwx,g::-,o::- /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||
setfacl -Rdm u:$ZMB_ADMIN_USER:rwx,g::-,o::- /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||
|
||||
systemctl restart smbd nmbd winbind
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user