diff --git a/deploy/h4backend.service b/deploy/h4backend.service index c892223..a0316a2 100644 --- a/deploy/h4backend.service +++ b/deploy/h4backend.service @@ -3,8 +3,7 @@ Description=H4 Backend [Service] Type=simple -#User= -#Group= +User=host ExecStart=/home/host/h4-projekt-gruppe-0-sm/backend/build/server Restart=on-failure RestartSec=10 diff --git a/deploy/install_service.sh b/deploy/install_service.sh index 1bb688a..b56ddb9 100755 --- a/deploy/install_service.sh +++ b/deploy/install_service.sh @@ -4,11 +4,9 @@ SERVICE=h4backend.service set -xe -sudo cp deploy/$SERVICE /etc/systemd/user/$SERVICE -systemctl --user daemon-reload - -systemctl --user enable $SERVICE -systemctl --user start $SERVICE - +sudo cp deploy/$SERVICE /etc/systemd/$SERVICE +systemctl daemon-reload +systemctl enable $SERVICE +systemctl start $SERVICE diff --git a/deploy/remove_service.sh b/deploy/remove_service.sh index c30d4be..b157224 100755 --- a/deploy/remove_service.sh +++ b/deploy/remove_service.sh @@ -4,10 +4,10 @@ SERVICE=h4backend.service set -xe -systemctl --user stop $SERVICE -systemctl --user disable $SERVICE +systemctl stop $SERVICE +systemctl disable $SERVICE -sudo rm /etc/systemd/user/$SERVICE +sudo rm /etc/systemd/$SERVICE