openvpn: systemd restart
This commit is contained in:
parent
0104ffa55c
commit
e5d25ee36e
|
@ -36,6 +36,16 @@ hostroutes-{{ name }}:
|
|||
name: {{ name }}
|
||||
- mode: 755
|
||||
|
||||
/etc/systemd/system/openvpn@{{ name }}.service.d:
|
||||
file.directory:
|
||||
- user: root
|
||||
|
||||
/etc/systemd/system/openvpn@{{ name }}.service.d/restart.conf:
|
||||
file.managed:
|
||||
- source: salt://vpn/systemd-restart.conf
|
||||
- mode: 644
|
||||
- require:
|
||||
- file: /etc/systemd/system/openvpn@{{ name }}.service.d
|
||||
|
||||
autostart-{{ name }}:
|
||||
service.enabled:
|
||||
|
|
3
salt/vpn/systemd-restart.conf
Normal file
3
salt/vpn/systemd-restart.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Service]
|
||||
Restart=always
|
||||
RestartSec=10s
|
Loading…
Reference in New Issue
Block a user