From 7ece196cff339d82dd1a413e86ce1dc6402603d3 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 4 Mar 2026 20:59:14 -0500 Subject: [PATCH] fix: refactor LocalAGI service configuration to use systemd drop-in override --- install/localagi-install.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/install/localagi-install.sh b/install/localagi-install.sh index f76dd2b34..97742a5cd 100644 --- a/install/localagi-install.sh +++ b/install/localagi-install.sh @@ -73,17 +73,6 @@ cat <"$service_path" Description=LocalAGI After=network.target [Service] -Type=simple -WorkingDirectory=/opt/localagi -ExecStart=/usr/local/bin/localagi -[Install] -WantedBy=multi-user.target -EOF - -mkdir -p /etc/systemd/system/localagi.service.d -override_file=/etc/systemd/system/localagi.service.d/override.conf -cat <<'EOF' >"$override_file" -[Service] User=root NoNewPrivileges=true PrivateTmp=true @@ -92,7 +81,13 @@ ProtectHome=true AmbientCapabilities= StandardOutput=journal StandardError=journal +Type=simple +WorkingDirectory=/opt/localagi +ExecStart=/usr/local/bin/localagi +[Install] +WantedBy=multi-user.target EOF + systemctl daemon-reload systemd-analyze verify localagi.service msg_ok "Created Service"