fix: streamline LocalAGI service creation by removing unnecessary options and verification step
This commit is contained in:
@@ -68,31 +68,22 @@ cd /opt/localagi/webui/react-ui &&
|
|||||||
msg_ok "Built LocalAGI from source"
|
msg_ok "Built LocalAGI from source"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
service_path="/etc/systemd/system/localagi.service"
|
cat <<EOF >/etc/systemd/system/localagi.service
|
||||||
cat <<EOF >"$service_path"
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=LocalAGI
|
Description=LocalAGI
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=root
|
User=root
|
||||||
NoNewPrivileges=true
|
|
||||||
PrivateTmp=true
|
|
||||||
ProtectSystem=full
|
|
||||||
ProtectHome=true
|
|
||||||
AmbientCapabilities=
|
|
||||||
StandardOutput=journal
|
|
||||||
StandardError=journal
|
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/opt/localagi
|
WorkingDirectory=/opt/localagi
|
||||||
ExecStart=/usr/local/bin/localagi
|
ExecStart=/usr/local/bin/localagi
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
systemd-analyze verify localagi.service
|
|
||||||
msg_ok "Created Service"
|
|
||||||
|
|
||||||
msg_info "Starting LocalAGI Service"
|
|
||||||
systemctl enable -q --now localagi
|
systemctl enable -q --now localagi
|
||||||
msg_ok "Started LocalAGI Service"
|
msg_ok "Started LocalAGI Service"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user