ianharrier / synology-scripts

Scripts for Synology DSM
MIT License
112 stars 34 forks source link

Reconnect doesn't seem working anymore #3

Closed polanskiman closed 5 years ago

polanskiman commented 5 years ago

Hello,

Script has been fine since last year but for the last couple of days something doesn't seem right. Initially VPN connections stopped working because the remote certificate had expired. Ok so that was fixed and connections seem to be working again. I had to recreate the VPN Profile but I am getting these errors now. Not sure if this is a coincidence or because of the certificate issue or because the profile was recreated.

Screen Shot 2019-09-11 at 13 27 41

The backups are being done but I am not receiving the notifications anymore. Settings haven't been changed on DSM so not sure what is going on. Ideas?

polanskiman commented 5 years ago

Ok. Silly me. I realized I had modified your code as follows:

if [[ $(/usr/syno/bin/synovpnc get_conn | grep Uptime) ]] && [[ $(ping -c 1 google.com) ]]; then

The ping portion of the code wasn't working because the "Use default gateway on remote network" option was enabled in the VPN profile thus preventing the ping getting a response. Once the default gateway option was disabled it all worked as before!