diff --git a/teamspeak/rootfs/etc/cont-init.d/20-folders.sh b/teamspeak/rootfs/etc/cont-init.d/20-folders.sh new file mode 100644 index 000000000..93d4fa4d0 --- /dev/null +++ b/teamspeak/rootfs/etc/cont-init.d/20-folders.sh @@ -0,0 +1,13 @@ +#!/usr/bin/with-contenv bashio +# shellcheck shell=bash + +LOCATION=$(bashio::config 'data_location') + +# Data remanence +if -d /teamspeak/save; then + cp -n /teamspeak/save "$LOCATION" + rm -r /teamspeak/save +fi + +mkdir -p "$LOCATION" +ln -sf "$LOCATION" /teamspeak/save