Skip to content

holstemi/synology-scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

synology-scripts

Scripts for Synology DSM

reconnect-vpn.sh

This script can be used as a workaround for Synology DSM's less-than-ideal reconnect behavior when a VPN connection is lost. The actual magic in this script was originally written by users on a thread on the Synology Forum. This script just provides a user-friendly wrapper to their code. For more information, including installation instructions, refer to my blog post.

As of version 1.1.0, extra customization options are included at the beginning of the script. Feel free to customize these to your liking.

As of version 1.2.0, the following exit codes are used:

  • 0: reconnect not needed
  • 1: reconnect successful
  • 2: reconnect failed
  • 3: configuration error

As of version 1.3.0, an option is added to allow pinging a custom IP address or hostname to validate VPN connectivity.

As of version 1.4.0, an option is added to choose a specific VPN profile to reconnect, if multiple profiles exist. In this configuration, you could run multiple instances of this script, each targeting a specific VPN profile.

About

Scripts for Synology DSM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%