[opensuse] why wasn't this service restarted?
I guess I need another pair of eyes. For some reason this vpn setup will occasionally fail to start. I have not had time to debug it, so just to make sure it is restarted, I added/etc/systemd/system/openvpn@hamburg.service.d/restart.conf # systemctl cat openvpn@hamburg # /usr/lib/systemd/system/openvpn@.service [Unit] Description=OpenVPN tunneling daemon instance using /etc/openvpn/%I.conf After=network.target PartOf=openvpn.target [Service] Type=forking PrivateTmp=true PIDFile=/var/run/openvpn/%i.pid ExecStart=/usr/sbin/openvpn --daemon --suppress-timestamps --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf ExecReload=/sbin/killproc -p /var/run/openvpn/%i.pid -HUP /usr/sbin/openvpn [Install] WantedBy=multi-user.target openvpn.target # /etc/systemd/system/openvpn@hamburg.service.d/restart.conf ExecStartPost=/bin/bash -c "/usr/bin/mail -s \"$HOSTNAME: %n was restarted\" per@jessen.ch http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
05.10.2016 19:33, Per Jessen пишет:
# /etc/systemd/system/openvpn@hamburg.service.d/restart.conf ExecStartPost=/bin/bash -c "/usr/bin/mail -s \"$HOSTNAME: %n was restarted\" per@jessen.ch
Section is missing. Those snippets must follow general unit syntax and include section names to which configuration directives belong. If you check messages for this unit, you will see "Assignment outside of section" error. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Andrei Borzenkov wrote:
05.10.2016 19:33, Per Jessen пишет:
# /etc/systemd/system/openvpn@hamburg.service.d/restart.conf ExecStartPost=/bin/bash -c "/usr/bin/mail -s \"$HOSTNAME: %n was restarted\" per@jessen.ch
Section is missing. Those snippets must follow general unit syntax and include section names to which configuration directives belong. If you check messages for this unit, you will see "Assignment outside of section" error.
Thanks Andrei - your eyes are clearly better than mine! I'll check the logfiles for that message. -- Per Jessen, Zürich (9.6°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
Per Jessen