From dc70bc13276768d738a6b171589497f2e0a13644 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 May 2026 19:27:25 +0000 Subject: [PATCH] fix(databasus): only patch service EnvironmentFile if not already updated Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/47c48b0f-1527-4b9c-a6f5-74c789e79785 Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com> --- ct/databasus.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ct/databasus.sh b/ct/databasus.sh index 4e0e25bfc..5642eecc0 100644 --- a/ct/databasus.sh +++ b/ct/databasus.sh @@ -90,10 +90,12 @@ function update_script() { chmod 600 /.env msg_ok "Restored Configuration" - msg_info "Updating Service" - sed -i 's|EnvironmentFile=.*|EnvironmentFile=/.env|' /etc/systemd/system/databasus.service - $STD systemctl daemon-reload - msg_ok "Updated Service" + if ! grep -q "EnvironmentFile=/.env" /etc/systemd/system/databasus.service; then + msg_info "Updating Service" + sed -i 's|EnvironmentFile=.*|EnvironmentFile=/.env|' /etc/systemd/system/databasus.service + $STD systemctl daemon-reload + msg_ok "Updated Service" + fi msg_info "Starting Databasus" $STD systemctl start databasus