aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/etc_fstab.j210
-rw-r--r--templates/jail_confs/dl.j23
-rw-r--r--templates/jail_confs/ingress.j22
-rw-r--r--templates/jail_confs/komga.j24
-rw-r--r--templates/jail_confs/plex.j24
-rw-r--r--templates/jail_confs/samba.j24
-rw-r--r--templates/jail_confs/syncthing.j29
7 files changed, 26 insertions, 10 deletions
diff --git a/templates/etc_fstab.j2 b/templates/etc_fstab.j2
index 0dab5dd..95d3fa0 100644
--- a/templates/etc_fstab.j2
+++ b/templates/etc_fstab.j2
@@ -5,13 +5,3 @@
/dev/nda2p3.eli none swap sw 0 0
/dev/nda3p3.eli none swap sw 0 0
tmpfs /tmp tmpfs rw,mode=777,size=2g 0 0
-
-/usr/local/jails/containers/goaccess/var/www/goaccess /usr/local/jails/containers/ingress/mnt/www_goaccess nullfs rw 0 0
-
-/usr/local/jails/volumes/storage/docs /usr/local/jails/containers/syncthing/mnt/docs nullfs rw 0 0
-/usr/local/jails/volumes/storage/vault /usr/local/jails/containers/syncthing/mnt/vault nullfs rw 0 0
-/usr/local/jails/volumes/storage/jan-systems-2025-content /usr/local/jails/containers/syncthing/mnt/jan-systems-2025-content nullfs rw 0 0
-/usr/local/jails/volumes/storage /usr/local/jails/containers/dl/mnt/storage nullfs rw 0 0
-/usr/local/jails/volumes/storage/media /usr/local/jails/containers/plex/mnt/media nullfs rw 0 0
-/usr/local/jails/volumes/storage /usr/local/jails/containers/samba/mnt/storage nullfs rw 0 0
-/usr/local/jails/volumes/storage/media/manga /usr/local/jails/containers/komga/mnt/manga nullfs rw 0 0
diff --git a/templates/jail_confs/dl.j2 b/templates/jail_confs/dl.j2
index d94cb82..8d98ef4 100644
--- a/templates/jail_confs/dl.j2
+++ b/templates/jail_confs/dl.j2
@@ -1,3 +1,6 @@
{% include 'jail_confs/_epl_network.j2' %}
devfs_ruleset = 4;
allow.mlock;
+
+exec.prestart += "mount -t nullfs /usr/local/jails/volumes/storage /usr/local/jails/containers/dl/mnt/storage || echo 'Failed to mount'";
+exec.poststop += "umount /usr/local/jails/containers/dl/mnt/storage || echo 'Failed to umount'";
diff --git a/templates/jail_confs/ingress.j2 b/templates/jail_confs/ingress.j2
index d6e4cad..59db3f1 100644
--- a/templates/jail_confs/ingress.j2
+++ b/templates/jail_confs/ingress.j2
@@ -12,4 +12,6 @@ exec.poststart += "jexec ${name} ifconfig epw{{ jail.num }}b up";
exec.poststart += "ifconfig epw{{ jail.num }}a up";
exec.poststart += "jexec ${name} service dhclient restart epw{{ jail.num }}b";
+exec.prestart += "mount -t nullfs /usr/local/jails/containers/goaccess/var/www/goaccess /usr/local/jails/containers/ingress/mnt/www_goaccess || echo 'Failed to mount'";
+exec.poststop += "umount /usr/local/jails/containers/ingress/mnt/www_goaccess || echo 'Failed to umount'";
exec.poststop += "ifconfig epw{{ jail.num }}a destroy";
diff --git a/templates/jail_confs/komga.j2 b/templates/jail_confs/komga.j2
new file mode 100644
index 0000000..2567fa2
--- /dev/null
+++ b/templates/jail_confs/komga.j2
@@ -0,0 +1,4 @@
+{% include 'jail_confs/_default.j2' %}
+
+exec.prestart += "mount -t nullfs /usr/local/jails/volumes/storage/media/manga /usr/local/jails/containers/komga/mnt/manga || echo 'Failed to mount'";
+exec.poststop += "umount /usr/local/jails/containers/komga/mnt/manga || echo 'Failed to umount'";
diff --git a/templates/jail_confs/plex.j2 b/templates/jail_confs/plex.j2
new file mode 100644
index 0000000..2446a14
--- /dev/null
+++ b/templates/jail_confs/plex.j2
@@ -0,0 +1,4 @@
+{% include 'jail_confs/_default.j2' %}
+
+exec.prestart += "mount -t nullfs /usr/local/jails/volumes/storage/media /usr/local/jails/containers/plex/mnt/media || echo 'Failed to mount'";
+exec.poststop += "umount /usr/local/jails/containers/plex/mnt/media || echo 'Failed to umount'";
diff --git a/templates/jail_confs/samba.j2 b/templates/jail_confs/samba.j2
new file mode 100644
index 0000000..24835fa
--- /dev/null
+++ b/templates/jail_confs/samba.j2
@@ -0,0 +1,4 @@
+{% include 'jail_confs/_default.j2' %}
+
+exec.prestart += "mount -t nullfs /usr/local/jails/volumes/storage /usr/local/jails/containers/samba/mnt/storage || echo 'Failed to mount'";
+exec.poststop += "umount /usr/local/jails/containers/samba/mnt/storage || echo 'Failed to umount'";
diff --git a/templates/jail_confs/syncthing.j2 b/templates/jail_confs/syncthing.j2
new file mode 100644
index 0000000..6c518ff
--- /dev/null
+++ b/templates/jail_confs/syncthing.j2
@@ -0,0 +1,9 @@
+{% include 'jail_confs/_default.j2' %}
+
+exec.prestart += "mount -t nullfs /usr/local/jails/volumes/storage/docs /usr/local/jails/containers/syncthing/mnt/docs || echo 'Failed to mount'";
+exec.prestart += "mount -t nullfs /usr/local/jails/volumes/storage/vault /usr/local/jails/containers/syncthing/mnt/vault || echo 'Failed to mount'";
+exec.prestart += "mount -t nullfs /usr/local/jails/volumes/storage/jan-systems-2025-content /usr/local/jails/containers/syncthing/mnt/jan-systems-2025-content || echo 'Failed to mount'";
+
+exec.poststop += "umount /usr/local/jails/containers/syncthing/mnt/jan-systems-2025-content || echo 'Failed to umount'";
+exec.poststop += "umount /usr/local/jails/containers/syncthing/mnt/vault || echo 'Failed to umount'";
+exec.poststop += "umount /usr/local/jails/containers/syncthing/mnt/docs || echo 'Failed to umount'";