diff --git a/src/freedombone-app-pixelfed b/src/freedombone-app-pixelfed index fc87e1c7..d69372f9 100755 --- a/src/freedombone-app-pixelfed +++ b/src/freedombone-app-pixelfed @@ -397,7 +397,12 @@ function install_pixelfed { cd "/var/www/$PIXELFED_DOMAIN_NAME/htdocs" || exit 36587357 cp "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env.example" "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env" - sed -i "s|APP_URL=http://.*|APP_URL=https://\$PIXELFED_DOMAIN_NAME|g" "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env" + + if [[ "$ONION_ONLY" != 'no' ]]; then + sed -i "s|APP_URL=http://.*|APP_URL=https://\$PIXELFED_DOMAIN_NAME|g" "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env" + else + sed -i "s|APP_URL=http://.*|APP_URL=http://\$PIXELFED_ONION_HOSTNAME|g" "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env" + fi sed -i "s|DB_DATABASE=.*|DB_DATABASE=pixelfed|g" "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env" sed -i "s|DB_USERNAME=.*|DB_USERNAME=root|g" "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env" sed -i "s|DB_PASSWORD=.*|DB_PASSWORD=$MARIADB_PASSWORD|g" "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env"