mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-18 16:32:17 +00:00
PocketID: Update PocketID for 2.x (#10506)
* Update PocketID for 2.x * Update env var
This commit is contained in:
@@ -29,6 +29,12 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mandatory as of v2.x.x
|
||||||
|
ENCRYPTION_KEY=$(openssl rand -base64 32)
|
||||||
|
if ! grep -q '^ENCRYPTION_KEY=' /opt/pocket-id/.env; then
|
||||||
|
echo "ENCRYPTION_KEY=$ENCRYPTION_KEY" >> /opt/pocket-id/.env
|
||||||
|
fi
|
||||||
|
|
||||||
if check_for_gh_release "pocket-id" "pocket-id/pocket-id"; then
|
if check_for_gh_release "pocket-id" "pocket-id/pocket-id"; then
|
||||||
if [ "$(printf '%s\n%s' "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" "1.0.0" | sort -V | head -n1)" = "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" ] &&
|
if [ "$(printf '%s\n%s' "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" "1.0.0" | sort -V | head -n1)" = "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" ] &&
|
||||||
[ "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" != "1.0.0" ]; then
|
[ "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" != "1.0.0" ]; then
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ read -r -p "${TAB3}What public URL do you want to use (e.g. pocketid.mydomain.co
|
|||||||
fetch_and_deploy_gh_release "pocket-id" "pocket-id/pocket-id" "singlefile" "latest" "/opt/pocket-id/" "pocket-id-linux-amd64"
|
fetch_and_deploy_gh_release "pocket-id" "pocket-id/pocket-id" "singlefile" "latest" "/opt/pocket-id/" "pocket-id-linux-amd64"
|
||||||
|
|
||||||
msg_info "Configuring Pocket ID"
|
msg_info "Configuring Pocket ID"
|
||||||
|
ENCRYPTION_KEY=$(openssl rand -base64 32)
|
||||||
|
|
||||||
cat <<EOF >/opt/pocket-id/.env
|
cat <<EOF >/opt/pocket-id/.env
|
||||||
APP_ENV=production
|
APP_ENV=production
|
||||||
APP_URL=https://${public_url}
|
APP_URL=https://${public_url}
|
||||||
@@ -24,6 +26,7 @@ TRUST_PROXY=false
|
|||||||
# MAXMIND_LICENSE_KEY=
|
# MAXMIND_LICENSE_KEY=
|
||||||
PORT=1411
|
PORT=1411
|
||||||
HOST=0.0.0.0
|
HOST=0.0.0.0
|
||||||
|
ENCRYPTION_KEY=${ENCRYPTION_KEY}
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Configured Pocket ID"
|
msg_ok "Configured Pocket ID"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user