add service + update file

This commit is contained in:
Philipp 2023-03-04 11:52:11 +01:00
parent 68c3628e61
commit ff78b64dfd
2 changed files with 21 additions and 0 deletions

16
rot.service Normal file
View File

@ -0,0 +1,16 @@
[Unit]
Description=Rot
[Service]
User=root
Group=root
WorkingDirectory=/home/k004373/rot
Environment="ROCKET_ENV=prod"
Environment="ROCKET_ADDRESS=127.0.0.1"
Environment="ROCKET_PORT=8001"
Environment="ROCKET_LOG=info"
ExecStart=/home/k004373/rot/target/release/rot
[Install]
WantedBy=multi-user.target

5
update.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
git pull
cargo b -r
sudo systemctl restart rot