This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# synology openvpn restart script | |
# get config and name here: | |
# cat /usr/syno/etc/synovpnclient/openvpn/ovpnclient.conf | |
if [[ `ifconfig | grep tun0 | wc -l` -eq 0 ]]; then | |
echo "Offline, restart" | |
echo conf_id=oXXXXXXXX > /usr/syno/etc/synovpnclient/vpnc_connecting | |
echo conf_name=XXXXXXXXXX >> /usr/syno/etc/synovpnclient/vpnc_connecting | |
echo proto=openvpn >> /usr/syno/etc/synovpnclient/vpnc_connecting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
####################### | |
# Setup: | |
# 1. Setup a VPN in the Synology web interface | |
# 2. Log in via SSH | |
# 3. Take a look at /usr/syno/etc/synovpnclient/openvpn/ovpnclient.conf | |
# 3. Find your VPN entry and fill in the variables below. | |
# ID = the CLIENT ID, shown between square brackets, e.g. "[o123456789]" | |
# CONFNAME = value of "conf_name" | |
# |