Add service config and selinux config

This commit is contained in:
Guus Waals
2025-10-29 20:16:47 +08:00
parent de05bb3480
commit 60aee19577
2 changed files with 21 additions and 0 deletions

6
CONFIG.md Normal file
View File

@@ -0,0 +1,6 @@
# Server config
Might have to run `sudo chcon -t bin_t ~/blog/target/release/blog-server` to make the binary executable
Update the port in main.rs to a free port

15
blog.service Normal file
View File

@@ -0,0 +1,15 @@
[Unit]
Description=Blog Server
After=network.target
[Service]
RestartSec=2s
Type=simple
User=fedora
Group=fedora
WorkingDirectory=/home/fedora/blog/
ExecStart=/home/fedora/blog/target/release/blog-server
Restart=always
[Install]
WantedBy=multi-user.target