Re: OpenVPN doesn't restart after sleep
Hi Tony
Sorry for the late reply, I suffered the same but I only just found out
how to fix this:
Add the following script to /lib/systemd/system-sleep (in case you are
using systemd):
$ cat /lib/systemd/system-sleep/openvpn.sh
#!/bin/bash
case "$1" in
post)
/bin/systemctl restart openvpn
;;
esac
or the following script to /etc/pm/sleep.d in case you are still using
sysv init:
$ cat /etc/pm/sleep.d/99openvpn
#!/bin/bash
case "$1" in
resume|thaw)
/etc/init.d/openvpn restart
;;
esac
Of coure in either case the script has to be executable (chmod +x)
hope this helps
regards
lukn
Reply to: