aboutsummaryrefslogtreecommitdiff
path: root/scripts/hostname/nfs1/20-shares
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-10-31 21:36:39 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-10-31 21:36:39 -0400
commit2c9845db4bc00221bc3c2343a020208f7f532166 (patch)
tree843bc24a1bbf2cad33c4bdc8a17c3d0d838fceb4 /scripts/hostname/nfs1/20-shares
parent7eb111136453d0e8d8451d7dd85ba9892318f294 (diff)
downloadinfrastructure-2c9845db4bc00221bc3c2343a020208f7f532166.tar.gz
many fixes
Diffstat (limited to 'scripts/hostname/nfs1/20-shares')
-rw-r--r--scripts/hostname/nfs1/20-shares34
1 files changed, 20 insertions, 14 deletions
diff --git a/scripts/hostname/nfs1/20-shares b/scripts/hostname/nfs1/20-shares
index beb3b11..0dd6ddb 100644
--- a/scripts/hostname/nfs1/20-shares
+++ b/scripts/hostname/nfs1/20-shares
@@ -1,16 +1,22 @@
#!/bin/sh
-# media/music
-create_dataset -p "${nfs_dataset}/media/music"
-zfs set \
- compression=off \
- com.sun:auto-snapshot:daily=true \
- com.sun:auto-snapshot:weekly=true \
- "${nfs_dataset}/media/music"
-chgrp media-admin "${nfs_root}/media/music"
-chmod 2770 "${nfs_root}/media/music"
-set_facl "${nfs_root}/media/music" \
- group:media-admin:rwpDdaARWcs:fd:allow \
- group:media-admin:x:d:allow \
- group:media-access:raRcs:fd:allow \
- group:media-access:x:d:allow
+media_access_group='media-access'
+media_admin_group='media-admin'
+media_shares='music shows movies audiobooks roms books scores isos'
+
+# media shares
+for share in $media_shares; do
+ create_dataset -p "${nfs_dataset}/media/${share}"
+ zfs set \
+ compression=off \
+ com.sun:auto-snapshot:daily=true \
+ com.sun:auto-snapshot:weekly=true \
+ "${nfs_dataset}/media/${share}"
+ chgrp "$media_admin_group" "${nfs_root}/media/${share}"
+ chmod 2770 "${nfs_root}/media/${share}"
+ set_facl "${nfs_root}/media/${share}" \
+ "group:${media_admin_group}:rwpDdaARWcs:fd:allow" \
+ "group:${media_admin_group}:x:d:allow" \
+ "group:${media_access_group}:raRcs:fd:allow" \
+ "group:${media_access_group}:x:d:allow"
+done