mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-23 10:23:00 +01:00
fix(immich): use start.sh in service, ensure DB_HOSTNAME in .env
This commit is contained in:
10
ct/immich.sh
10
ct/immich.sh
@@ -263,6 +263,16 @@ EOF
|
||||
[[ ! -f /usr/bin/immich ]] && ln -sf "$APP_DIR"/cli/bin/immich /usr/bin/immich
|
||||
[[ ! -f /usr/bin/immich-admin ]] && ln -sf "$APP_DIR"/bin/immich-admin /usr/bin/immich-admin
|
||||
|
||||
if ! grep -q '^DB_HOSTNAME=' "$INSTALL_DIR"/.env; then
|
||||
sed -i '/^DB_DATABASE_NAME/a DB_HOSTNAME=127.0.0.1' "$INSTALL_DIR"/.env
|
||||
fi
|
||||
|
||||
if grep -q 'ExecStart=/usr/bin/node' /etc/systemd/system/immich-web.service; then
|
||||
sed -i '/^EnvironmentFile=/d' /etc/systemd/system/immich-web.service
|
||||
sed -i "s|^ExecStart=.*|ExecStart=${APP_DIR}/bin/start.sh|" /etc/systemd/system/immich-web.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
chown -R immich:immich "$INSTALL_DIR"
|
||||
if [[ "${MAINT_MODE:-0}" == 1 ]]; then
|
||||
msg_info "Disabling Maintenance Mode"
|
||||
|
||||
@@ -469,8 +469,7 @@ User=immich
|
||||
Group=immich
|
||||
UMask=0077
|
||||
WorkingDirectory=${APP_DIR}
|
||||
EnvironmentFile=${INSTALL_DIR}/.env
|
||||
ExecStart=/usr/bin/node ${APP_DIR}/dist/main
|
||||
ExecStart=${APP_DIR}/bin/start.sh
|
||||
Restart=on-failure
|
||||
SyslogIdentifier=immich-web
|
||||
StandardOutput=append:/var/log/immich/web.log
|
||||
|
||||
Reference in New Issue
Block a user