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]
|
[Unit]
|
||||||
Description=Frp Client Service
|
Description=Frp Client Service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
StartLimitIntervalSec=3
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=idle
|
||||||
User=nobody
|
User=nobody
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Frp Client Service
|
Description=Frp Client Service (%i)
|
||||||
After=network.target
|
After=network.target
|
||||||
|
StartLimitIntervalSec=3
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=idle
|
Type=idle
|
||||||
User=nobody
|
User=nobody
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
|
ExecStartPre=/bin/test -s /etc/frp/%i.ini
|
||||||
ExecStart=/usr/bin/frpc -c /etc/frp/%i.ini
|
ExecStart=/usr/bin/frpc -c /etc/frp/%i.ini
|
||||||
ExecReload=/usr/bin/frpc reload -c /etc/frp/%i.ini
|
ExecReload=/usr/bin/frpc reload -c /etc/frp/%i.ini
|
||||||
|
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Frp Server Service
|
Description=Frp Server Service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
StartLimitIntervalSec=3
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=nobody
|
User=nobody
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
|
ExecStartPre=/bin/test -s /etc/frp/frps.ini
|
||||||
ExecStart=/usr/bin/frps -c /etc/frp/frps.ini
|
ExecStart=/usr/bin/frps -c /etc/frp/frps.ini
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Frp Server Service
|
Description=Frp Server Service (%i)
|
||||||
After=network.target
|
After=network.target
|
||||||
|
StartLimitIntervalSec=3
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=nobody
|
User=nobody
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
|
ExecStartPre=/bin/test -s /etc/frp/%i.ini
|
||||||
ExecStart=/usr/bin/frps -c /etc/frp/%i.ini
|
ExecStart=/usr/bin/frps -c /etc/frp/%i.ini
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Loading…
Reference in New Issue
Block a user