mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-19 19:45:54 +01:00
Compare commits
1 Commits
main
...
fix/immich
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcd0a6faaa |
@@ -104,6 +104,10 @@ function update() {
|
|||||||
$STD npm run build
|
$STD npm run build
|
||||||
msg_ok "Built ${APP}"
|
msg_ok "Built ${APP}"
|
||||||
|
|
||||||
|
msg_info "Updating service"
|
||||||
|
create_service
|
||||||
|
msg_ok "Updated service"
|
||||||
|
|
||||||
msg_info "Starting service"
|
msg_info "Starting service"
|
||||||
systemctl start immich-proxy
|
systemctl start immich-proxy
|
||||||
msg_ok "Started service"
|
msg_ok "Started service"
|
||||||
@@ -112,6 +116,27 @@ function update() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function create_service() {
|
||||||
|
cat <<EOF >"$SERVICE_PATH"
|
||||||
|
[Unit]
|
||||||
|
Description=Immich Public Proxy
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=${INSTALL_PATH}/app
|
||||||
|
EnvironmentFile=${CONFIG_PATH}/.env
|
||||||
|
ExecStart=/usr/bin/node ${INSTALL_PATH}/app/dist/index.js
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl daemon-reload
|
||||||
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# INSTALL
|
# INSTALL
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@@ -173,23 +198,7 @@ EOF
|
|||||||
msg_ok "Created configuration"
|
msg_ok "Created configuration"
|
||||||
|
|
||||||
msg_info "Creating service"
|
msg_info "Creating service"
|
||||||
cat <<EOF >"$SERVICE_PATH"
|
create_service
|
||||||
[Unit]
|
|
||||||
Description=Immich Public Proxy
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
WorkingDirectory=${INSTALL_PATH}
|
|
||||||
EnvironmentFile=${CONFIG_PATH}/.env
|
|
||||||
ExecStart=/usr/bin/node ${INSTALL_PATH}/app/server.js
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now immich-proxy
|
systemctl enable -q --now immich-proxy
|
||||||
msg_ok "Created and started service"
|
msg_ok "Created and started service"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user