add otp key

This commit is contained in:
CanbiZ (MickLesk)
2026-04-27 10:48:09 +02:00
parent 3a356b3165
commit b8295a3613
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -53,6 +53,10 @@ function update_script() {
export PATH="/root/.rbenv/shims:/root/.rbenv/bin:$PATH"
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
fi
set -a && source /opt/dawarich/.env && set +a
$STD bundle config set --local deployment 'true'
+2
View File
@@ -46,10 +46,12 @@ msg_ok "Set up Directories"
msg_info "Configuring Environment"
SECRET_KEY_BASE=$(openssl rand -hex 64)
OTP_ENCRYPTION_PRIMARY_KEY=$(openssl rand -hex 32)
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}
DATABASE_HOST=localhost
DATABASE_USERNAME=${PG_DB_USER}
DATABASE_PASSWORD=${PG_DB_PASS}