mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-30 22:16:02 +00:00
Fix Dawarich Install/Update (#14078)
* [feat] adding envs Add required envs to .env https://github.com/Freika/dawarich/issues/2543 * Dawarich: add required envs to install script
This commit is contained in:
+9
-1
@@ -54,7 +54,15 @@ function update_script() {
|
||||
eval "$(/root/.rbenv/bin/rbenv init - bash)"
|
||||
|
||||
if ! grep -q "OTP_ENCRYPTION_PRIMARY_KEY" /opt/dawarich/.env; then
|
||||
echo "OTP_ENCRYPTION_PRIMARY_KEY=$(openssl rand -hex 32)" >>/opt/dawarich/.env
|
||||
echo "OTP_ENCRYPTION_PRIMARY_KEY=$(openssl rand -hex 64)" >>/opt/dawarich/.env
|
||||
fi
|
||||
|
||||
if ! grep -q "OTP_ENCRYPTION_DETERMINISTIC_KEY" /opt/dawarich/.env; then
|
||||
echo "OTP_ENCRYPTION_DETERMINISTIC_KEY=$(openssl rand -hex 64)" >>/opt/dawarich/.env
|
||||
fi
|
||||
|
||||
if ! grep -q "OTP_ENCRYPTION_KEY_DERIVATION_SALT" /opt/dawarich/.env; then
|
||||
echo "OTP_ENCRYPTION_KEY_DERIVATION_SALT=$(openssl rand -hex 64)" >>/opt/dawarich/.env
|
||||
fi
|
||||
|
||||
set -a && source /opt/dawarich/.env && set +a
|
||||
|
||||
@@ -46,12 +46,16 @@ msg_ok "Set up Directories"
|
||||
|
||||
msg_info "Configuring Environment"
|
||||
SECRET_KEY_BASE=$(openssl rand -hex 64)
|
||||
OTP_ENCRYPTION_PRIMARY_KEY=$(openssl rand -hex 32)
|
||||
OTP_ENCRYPTION_PRIMARY_KEY=$(openssl rand -hex 64)
|
||||
OTP_ENCRYPTION_DETERMINISTIC_KEY=$(openssl rand -hex 64)
|
||||
OTP_ENCRYPTION_KEY_DERIVATION_SALT=$(openssl rand -hex 64)
|
||||
RELEASE=$(get_latest_github_release "Freika/dawarich")
|
||||
cat <<EOF >/opt/dawarich/.env
|
||||
RAILS_ENV=production
|
||||
SECRET_KEY_BASE=${SECRET_KEY_BASE}
|
||||
OTP_ENCRYPTION_PRIMARY_KEY=${OTP_ENCRYPTION_PRIMARY_KEY}
|
||||
OTP_ENCRYPTION_DETERMINISTIC_KEY=${OTP_ENCRYPTION_DETERMINISTIC_KEY}
|
||||
OTP_ENCRYPTION_KEY_DERIVATION_SALT=${OTP_ENCRYPTION_KEY_DERIVATION_SALT}
|
||||
DATABASE_HOST=localhost
|
||||
DATABASE_USERNAME=${PG_DB_USER}
|
||||
DATABASE_PASSWORD=${PG_DB_PASS}
|
||||
|
||||
Reference in New Issue
Block a user