mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 06:14:07 +02:00
Update and rename 21-folders to 41-folders
This commit is contained in:
@@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
|
||||||
|
|
||||||
##################
|
|
||||||
# SYMLINK CONFIG #
|
|
||||||
##################
|
|
||||||
|
|
||||||
#Create folders
|
|
||||||
|
|
||||||
if [ ! -d /share/piwigo ]; then
|
|
||||||
echo "Creating /share/piwigo"
|
|
||||||
mkdir -p /share/piwigo
|
|
||||||
chown -R abc:abc /share/piwigo
|
|
||||||
else
|
|
||||||
chown -R abc:abc /share/piwigo
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d /share/piwigo/config ]; then
|
|
||||||
echo "Creating /share/piwigo/config
|
|
||||||
mkdir -p /share/piwigo/config
|
|
||||||
chown -R abc:abc /share/piwigo/config
|
|
||||||
else
|
|
||||||
chown -R abc:abc /share/piwigo/config
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d /share/piwigo/keys ]; then
|
|
||||||
echo "Creating /share/piwigo/keys
|
|
||||||
mkdir -p /share/piwigo/keys
|
|
||||||
chown -R abc:abc /share/piwigo/keys
|
|
||||||
else
|
|
||||||
chown -R abc:abc /share/piwigo/keys
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create symlinks
|
|
||||||
|
|
||||||
echo "Symlink config"
|
|
||||||
ln -s /share/piwigo/config /gallery/local || mkdir /gallery/local/config & ln -s /share/piwigo/config /gallery/local
|
|
||||||
echo "Symlink keys"
|
|
||||||
ln -s /share/piwigo/config/keys /config || mkdir /config/keys & ln -s /share/piwigo/config/keys /config
|
|
||||||
37
piwigo/rootfs/etc/cont-init.d/41-folders
Normal file
37
piwigo/rootfs/etc/cont-init.d/41-folders
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
##################
|
||||||
|
# SYMLINK CONFIG #
|
||||||
|
##################
|
||||||
|
|
||||||
|
#Create folders
|
||||||
|
|
||||||
|
if [ ! -d /share/piwigo ]; then
|
||||||
|
echo "Creating /share/piwigo"
|
||||||
|
mkdir -p /share/piwigo
|
||||||
|
chown -R abc:abc /share/piwigo
|
||||||
|
else
|
||||||
|
chown -R abc:abc /share/piwigo
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /share/piwigo/config ]; then
|
||||||
|
echo "moving config folder"
|
||||||
|
mv /gallery/local/config /share/piwigo
|
||||||
|
ln -s /share/piwigo/config /gallery/local
|
||||||
|
echo "links done"
|
||||||
|
else
|
||||||
|
rm /gallery/local/config
|
||||||
|
ln -s /share/piwigo/config /gallery/local
|
||||||
|
echo "Using existing config"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /share/piwigo/keys ]; then
|
||||||
|
echo "moving keys folder"
|
||||||
|
mv /config/keys /share/piwigo
|
||||||
|
ln -s /share/piwigo/keys /config
|
||||||
|
echo "links done"
|
||||||
|
else
|
||||||
|
rm /config/keys
|
||||||
|
ln -s /share/piwigo/keys /config
|
||||||
|
echo "Using existing keys folder"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user