mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 06:14:07 +02:00
Update 21-folders
This commit is contained in:
@@ -1,14 +1,11 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
##################
|
|
||||||
# CORRECT CONFIG #
|
|
||||||
##################
|
|
||||||
sed -i "s|$conf['show_php_errors'] = E_ALL;|$conf['show_php_errors'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED;|g" /gallery/local/config/config.inc.php && echo "config corrected for php error" || true
|
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# SYMLINK CONFIG #
|
# SYMLINK CONFIG #
|
||||||
##################
|
##################
|
||||||
|
|
||||||
|
#Create folders
|
||||||
|
|
||||||
if [ ! -d /share/piwigo ]; then
|
if [ ! -d /share/piwigo ]; then
|
||||||
echo "Creating /share/piwigo"
|
echo "Creating /share/piwigo"
|
||||||
mkdir -p /share/piwigo
|
mkdir -p /share/piwigo
|
||||||
@@ -17,26 +14,21 @@ else
|
|||||||
chown -R abc:abc /share/piwigo
|
chown -R abc:abc /share/piwigo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If config doesn't exist, create it
|
|
||||||
if [ ! -d /share/piwigo/config ]; then
|
if [ ! -d /share/piwigo/config ]; then
|
||||||
echo "moving config folder"
|
echo "Creating /share/piwigo/config
|
||||||
mv /gallery/local/config /share/piwigo
|
mkdir -p /share/piwigo/config
|
||||||
ln -s /share/piwigo/config /gallery/local
|
chown -R abc:abc /share/piwigo/config
|
||||||
echo "links done"
|
|
||||||
else
|
|
||||||
rm /gallery/local/config
|
|
||||||
ln -s /share/piwigo/config /gallery/local
|
|
||||||
echo "Using existing config"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If keys don't exist, create it
|
|
||||||
if [ ! -d /share/piwigo/keys ]; then
|
if [ ! -d /share/piwigo/keys ]; then
|
||||||
echo "moving keys folder"
|
echo "Creating /share/piwigo/keys
|
||||||
mv /config/keys /share/piwigo
|
mkdir -p /share/piwigo/keys
|
||||||
ln -s /share/piwigo/keys /config
|
chown -R abc:abc /share/piwigo/keys
|
||||||
echo "links done"
|
|
||||||
else
|
|
||||||
rm /config/keys
|
|
||||||
ln -s /share/piwigo/keys /config
|
|
||||||
echo "Using existing keys folder"
|
|
||||||
fi
|
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 /config/keys || mkdir /config/keys & ln -s /share/piwigo/config /config/keys
|
||||||
|
|||||||
Reference in New Issue
Block a user