adds persistent root volume and shell history for www-data user

This commit is contained in:
Jean-Christophe Vanhalle
2024-10-12 16:35:50 +02:00
parent f94e7baba5
commit d582d4c7f0
8 changed files with 18 additions and 3 deletions

View File

@@ -6,12 +6,15 @@ if [ "$(id -u)" -ne 0 ]; then
exit 1
fi
volumes="certs dynamic logs static webroot"
volumes="certs dynamic logs root static webroot"
for volume in ${volumes}; do
mount_path="${PWD}/traefik-volumes/${volume}"
if [ "${volume}" = "webroot" ]; then
mount_path="${PWD}/${volume}-volume"
fi
if [ "${volume}" = "root" ]; then
mount_path="${PWD}/${volume}-volume"
fi
if mountpoint "${mount_path}" -q; then
echo "umounting ${mount_path}"
umount "${mount_path}"