[Bugfix] added back sqlite symlink (#706)

This commit is contained in:
Alex Justesen
2023-08-31 08:20:08 -04:00
committed by GitHub
parent 13a3605700
commit 3984b8987f
@@ -15,6 +15,27 @@ chown -R webuser:webgroup $WEBUSER_HOME
echo "✅ Permissions fixed."
echo ""
if [ ${DB_CONNECTION:="sqlite"} = "sqlite" ]; then
# create symlinks
echo "🔗 Creating database symlink..."
symlinks=( \
/var/www/html/database/database.sqlite \
)
for i in "${symlinks[@]}"
do
if [[ -e "$i" && ! -L "$i" ]]; then
rm -rf "$i"
fi
if [[ ! -L "$i" ]]; then
ln -s /config/"$(basename "$i")" "$i"
fi
done
echo "✅ Database symlink created."
echo ""
fi
# Check for env file
if [ ! -f /config/.env ]; then
echo "🙄 Environment file not found, creating..."