Skip to content

Commit

Permalink
Move Nextcloud's data directory out of ~
Browse files Browse the repository at this point in the history
This ensures it survives reprovisions.
  • Loading branch information
strugee committed Oct 13, 2024
1 parent 417496f commit 3bcec2f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
3 changes: 0 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,3 @@ $(ls /usr/bin/seagl* | xargs -n 1 basename)
$(ls /usr/sbin/seagl* | xargs -n 1 basename)
sudo rpm-ostree update
EOF

# TODO set up Nextcloud, and make sure its data dir is not in ~
# TODO set up OBS
4 changes: 4 additions & 0 deletions sbin/seagl-reset-users
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ grep -ve '^root' -e '^firebird' /etc/passwd | cut -d: -f1 | xargs -n 1 userdel -
# Password hash corresponds to `password`
adduser seagloperator -c 'SeaGL Operator' -mp '$y$j9T$emVbho1jsDyzxlJVlATJU.$GYps0oI9FuW.WC3KCXZQkRDq8zGV0gjDIuJLAK1mtP8' -G wheel

mkdir -p /var/lib/seagl-nextcloud
chown seagloperator:seagloperator /var/lib/seagl-nextcloud
systemctl restart nextcloud-dir.mount

touch /var/lib/seagl/users-created
17 changes: 17 additions & 0 deletions systemd/home-seagloperator-Nextcloud.mount
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[Unit]
Description=Nextcloud mount that survives system reprovisions
DefaultDependencies=no
Conflicts=umount.target
After=local-fs.target
Before=multi-user.target umount.target
ConditionPathExists=/home/seagloperator

[Mount]
What=/var/lib/seagl-nextcloud
Where=/home/seagloperator/Nextcloud
Type=none
Options=bind
DirectoryMode=0777

[Install]
WantedBy=multi-user.target

0 comments on commit 3bcec2f

Please sign in to comment.