Update systemd unit files
- Add instance name to template units - Change service type to `idle` for frpc - Check config file existence before starting
This commit is contained in:
parent
adc3adc13b
commit
6459c45b5c
@ -1,9 +1,10 @@
|
||||
[Unit]
|
||||
Description=Frp Client Service
|
||||
After=network.target
|
||||
StartLimitIntervalSec=3
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Type=idle
|
||||
User=nobody
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
@ -1,12 +1,14 @@
|
||||
[Unit]
|
||||
Description=Frp Client Service
|
||||
Description=Frp Client Service (%i)
|
||||
After=network.target
|
||||
StartLimitIntervalSec=3
|
||||
|
||||
[Service]
|
||||
Type=idle
|
||||
User=nobody
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
ExecStartPre=/bin/test -s /etc/frp/%i.ini
|
||||
ExecStart=/usr/bin/frpc -c /etc/frp/%i.ini
|
||||
ExecReload=/usr/bin/frpc reload -c /etc/frp/%i.ini
|
||||
|
||||
|
@ -1,12 +1,14 @@
|
||||
[Unit]
|
||||
Description=Frp Server Service
|
||||
After=network.target
|
||||
StartLimitIntervalSec=3
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nobody
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
ExecStartPre=/bin/test -s /etc/frp/frps.ini
|
||||
ExecStart=/usr/bin/frps -c /etc/frp/frps.ini
|
||||
|
||||
[Install]
|
||||
|
@ -1,12 +1,14 @@
|
||||
[Unit]
|
||||
Description=Frp Server Service
|
||||
Description=Frp Server Service (%i)
|
||||
After=network.target
|
||||
StartLimitIntervalSec=3
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nobody
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
ExecStartPre=/bin/test -s /etc/frp/%i.ini
|
||||
ExecStart=/usr/bin/frps -c /etc/frp/%i.ini
|
||||
|
||||
[Install]
|
||||
|
Loading…
Reference in New Issue
Block a user