Files
hassio-addons/piwigo/rootfs/etc/cont-init.d/41-folders
2021-08-31 15:01:37 +02:00

22 lines
443 B
Plaintext

#!/usr/bin/with-contenv bash
##################
# SYMLINK CONFIG #
##################
# If config doesn't exist, create it
if [ ! -d /data/config ]; then
echo "moving config folder"
mv /gallery/local/config /data
ln -s /data/config /gallery/local
echo "links done"
fi
# If keys don't exist, create it
if [ ! -d /data/keys ]; then
echo "moving keys folder"
mv /config/keys /data
ln -s /data/keys /config
echo "links done"
fi