after suspend-to-disk via hibernate-script I can't reach the internet. That happens since I use openvpn. Stopping network, restarting openvpn and the starting the network solves the problem. I want to configure hibernate-script to do this automatically. I tried setting RestartServices networking openvpn in hibernate.conf but this doesn't work (I think this first restarts networking and then openvpn but I need the openvpn restart in between).

Kind regards, Sebastian

有帮助吗?

解决方案

As hibernate.conf doesn't seem to work I did this :

echo 'case "${1}" in
    hibernate|suspend)
    sudo service openvpn restart
    ;;
esac' | sudo tee /etc/pm/sleep.d/20_restart-openvpn
sudo chmod +x /etc/pm/sleep.d/20_restart-openvpn

This create a script called "20_restart-openvpn" (you can change the name of the script) and make it executable. I hope this can help you too ...

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top