On 31/05/2017 19:50, Xen wrote:
> David Sommerseth schreef op 31-05-2017 18:28:
>> On 31/05/17 17:05, Xen wrote:
>>> Riccardo Paolo Bestetti schreef op 31-05-2017 16:01:
>>>> It's not OpenVPN you should configure, but your Operating System.
>>>> You should refer to its documentation or its relevant mailing list.
>>>
>>> You can also do:
>>>
>>> # crontab -l | { cat; echo "*/15 * * * * /bin/sh -c 'ifconfig | grep
>>> tun0 > /dev/null || systemctl restart openvn'"; } | crontab
>>>
>>> This will check very 15 minutes whether tun0 is up and if not will use
>>> systemctl to restart openvpn service.
>>>
>>> Not sure what runs on Raspbian.
>>
>> As you use systemctl, that implies systemd.  Then that hack is truly
>> ugly compared to what systemd provides.
> 
> So how can you get systemd to send you emails?
> 
> Can you let it run a script on restart?
> 

Hi,

A few months back I looked into exactly this issue. Back then there was
no easy way to make systemd send emails. That is why I still use monit
which has good notification capabilities:

<https://www.mmonit.com/monit/>

Monit works by polling service states periodically, so some delay is
always involved. Monit can, however, do whatever you want when a problem
is encountered and is not limited to just restarting the service.

Combining systemd instantaneous restarts with monit's notifications is a
pretty good system imho.

-- 
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to