Optimize rpxy.service to use more systemd features
...insted of manually managing them.
This commit is contained in:
parent
76dfd09bec
commit
ce4316d15f
1 changed files with 15 additions and 4 deletions
|
|
@ -1,12 +1,23 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=rpxy Service
|
Description=rpxy system service
|
||||||
|
Documentation=https://github.com/junkurihara/rust-rpxy
|
||||||
After=network.target
|
After=network.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
Type=simple
|
||||||
ExecStart=/usr/local/bin/rpxy-start.sh
|
ExecStart=/usr/local/bin/rpxy-start.sh
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
User=rpxy
|
User=rpxy
|
||||||
|
Group=rpxy
|
||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
|
NoNewPrivileges=true
|
||||||
|
PrivateTmp=true
|
||||||
|
ProtectSystem=full
|
||||||
|
ProtectHome=true
|
||||||
|
RuntimeDirectory=rpxy
|
||||||
|
RuntimeDirectoryMode=0750
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue