Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
d8b5dd5d10 immichframe: set the admin password the new admin UI requires
immichFrame/ImmichFrame#698 added an admin UI that refuses to open
/admin unless IMMICHFRAME_ADMIN_PASSWORD is set, leaving users to edit
the unit by hand after an install or an upgrade from an older version.

Generate one, put it in the unit next to the other Environment lines,
and record it in ~/immichframe.creds the way the other scripts record
credentials. The update adds the line only when it is missing, so a
password already set by hand survives.
2026-09-17 10:07:43 +02:00
4 changed files with 21 additions and 8 deletions

View File

@@ -79,6 +79,17 @@ function update_script() {
restore_backup
chown -R immichframe:immichframe /opt/immichframe
if ! grep -q '^Environment=IMMICHFRAME_ADMIN_PASSWORD=' /etc/systemd/system/immichframe.service; then
msg_info "Setting Admin Password"
ADMIN_PASSWORD=$(openssl rand -hex 16)
sed -i "/^Environment=DOTNET_CONTENTROOT=/a Environment=IMMICHFRAME_ADMIN_PASSWORD=${ADMIN_PASSWORD}" /etc/systemd/system/immichframe.service
{
echo "ImmichFrame Admin User: admin"
echo "ImmichFrame Admin Password: $ADMIN_PASSWORD"
} >>~/immichframe.creds
systemctl daemon-reload
msg_ok "Set Admin Password (see ~/immichframe.creds)"
fi
msg_info "Starting Service"
systemctl start immichframe

View File

@@ -50,10 +50,8 @@ function update_script() {
restore_backup
msg_info "Running Poznote Initialization"
POZNOTE_INIT=/opt/poznote/docker/init.sh
[[ -f "$POZNOTE_INIT" ]] || POZNOTE_INIT=/opt/poznote/init.sh
chmod +x "$POZNOTE_INIT"
$STD "$POZNOTE_INIT"
chmod +x /opt/poznote/init.sh
$STD /opt/poznote/init.sh
msg_ok "Initialized Poznote Data Directory"
msg_info "Updating Nginx Configuration"

View File

@@ -60,6 +60,11 @@ chown -R immichframe:immichframe /opt/immichframe
msg_ok "Setup ImmichFrame"
msg_info "Creating Service"
ADMIN_PASSWORD=$(openssl rand -hex 16)
{
echo "ImmichFrame Admin User: admin"
echo "ImmichFrame Admin Password: $ADMIN_PASSWORD"
} >>~/immichframe.creds
cat <<EOF >/etc/systemd/system/immichframe.service
[Unit]
Description=ImmichFrame Digital Photo Frame
@@ -74,6 +79,7 @@ ExecStart=/usr/bin/dotnet /opt/immichframe/ImmichFrame.WebApi.dll
Environment=ASPNETCORE_URLS=http://0.0.0.0:8080
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_CONTENTROOT=/opt/immichframe
Environment=IMMICHFRAME_ADMIN_PASSWORD=$ADMIN_PASSWORD
Restart=always
RestartSec=5
StandardOutput=journal

View File

@@ -29,10 +29,8 @@ chown -R www-data:www-data /var/www/html
msg_ok "Deployed Poznote"
msg_info "Running Poznote Initialization"
POZNOTE_INIT=/opt/poznote/docker/init.sh
[[ -f "$POZNOTE_INIT" ]] || POZNOTE_INIT=/opt/poznote/init.sh
chmod +x "$POZNOTE_INIT"
$STD "$POZNOTE_INIT"
chmod +x /opt/poznote/init.sh
$STD /opt/poznote/init.sh
msg_ok "Initialized Poznote Data Directory"
msg_info "Configuring Nginx"