Skip to content

Commit

Permalink
🚑 Force database to use /data
Browse files Browse the repository at this point in the history
  • Loading branch information
timmo001 committed Sep 14, 2019
1 parent 832a797 commit 1cdba17
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rootfs/etc/cont-init.d/secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
# ==============================================================================
# This updates the internal auth secret for the API
# ==============================================================================
sed -i -e "s/API_AUTH_SECRET/$(openssl rand -base64 32)/g" /opt/panel/config/default.json
if [ "$(grep -i 'API_AUTH_SECRET' /opt/panel/config/default.json)" = 0 ]; then
sed -i -e "s/API_AUTH_SECRET/$(openssl rand -base64 32)/g" /opt/panel/config/default.json
fi

if [ "$(grep -i '../db' /opt/panel/config/default.json)" = 0 ]; then
# Force database to use /data
sed -i "s#../db#/data#g" /opt/panel/config/default.json
fi

0 comments on commit 1cdba17

Please sign in to comment.