use root systemd

This commit is contained in:
SimonFJ20 2025-03-07 11:35:33 +01:00
parent 7a34578981
commit d9dc6e67b7
3 changed files with 8 additions and 11 deletions

View File

@ -3,8 +3,7 @@ Description=H4 Backend
[Service] [Service]
Type=simple Type=simple
#User= User=host
#Group=
ExecStart=/home/host/h4-projekt-gruppe-0-sm/backend/build/server ExecStart=/home/host/h4-projekt-gruppe-0-sm/backend/build/server
Restart=on-failure Restart=on-failure
RestartSec=10 RestartSec=10

View File

@ -4,11 +4,9 @@ SERVICE=h4backend.service
set -xe set -xe
sudo cp deploy/$SERVICE /etc/systemd/user/$SERVICE sudo cp deploy/$SERVICE /etc/systemd/$SERVICE
systemctl --user daemon-reload systemctl daemon-reload
systemctl --user enable $SERVICE
systemctl --user start $SERVICE
systemctl enable $SERVICE
systemctl start $SERVICE

View File

@ -4,10 +4,10 @@ SERVICE=h4backend.service
set -xe set -xe
systemctl --user stop $SERVICE systemctl stop $SERVICE
systemctl --user disable $SERVICE systemctl disable $SERVICE
sudo rm /etc/systemd/user/$SERVICE sudo rm /etc/systemd/$SERVICE