From db13f2c85196b2918a34dd33ae79afcc273c45c7 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 15 Jun 2022 15:00:27 +0200 Subject: [PATCH] Update 20-folders.sh --- teamspeak/rootfs/etc/cont-init.d/20-folders.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/teamspeak/rootfs/etc/cont-init.d/20-folders.sh b/teamspeak/rootfs/etc/cont-init.d/20-folders.sh index 93d4fa4d0..30e76170c 100644 --- a/teamspeak/rootfs/etc/cont-init.d/20-folders.sh +++ b/teamspeak/rootfs/etc/cont-init.d/20-folders.sh @@ -3,7 +3,7 @@ LOCATION=$(bashio::config 'data_location') -# Data remanence +# Data remanence for /teamspeak/save if -d /teamspeak/save; then cp -n /teamspeak/save "$LOCATION" rm -r /teamspeak/save @@ -11,3 +11,14 @@ fi mkdir -p "$LOCATION" ln -sf "$LOCATION" /teamspeak/save +chown -R 503:503 "$LOCATION" + +# Data remanence for /data +if -d /data; then + cp -n /data "$LOCATION" + rm -r /data +fi + +mkdir -p "$LOCATION" +ln -sf "$LOCATION" /data +chown -R 503:503 "$LOCATION"