Add service config and selinux config
This commit is contained in:
6
CONFIG.md
Normal file
6
CONFIG.md
Normal 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
15
blog.service
Normal 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
|
||||||
Reference in New Issue
Block a user