-
-
Save thekitp/cf7ae97741995406a57dcaa27ed68629 to your computer and use it in GitHub Desktop.
/etc/init.d/vpnserver file for softether using Local Bridge
This file contains hidden or 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 | |
| # chkconfig: 2345 99 01 | |
| # description: SoftEther VPN Server | |
| DAEMON=/usr/local/vpnserver/vpnserver | |
| LOCK=/var/lock/subsys/vpnserver | |
| TAP_ADDR=192.168.7.1 | |
| TAP_ADAPTER='tap_soft' | |
| test -x $DAEMON || exit 0 | |
| case "$1" in | |
| start) | |
| $DAEMON start | |
| touch $LOCK | |
| sleep 3 | |
| ifconfig tap_vpn 192.168.250.1 | |
| service dhcpd restart | |
| sleep 1 | |
| ifconfig $TAP_ADAPTER $TAP_ADDR | |
| ;; | |
| stop) | |
| $DAEMON stop | |
| rm $LOCK | |
| ;; | |
| restart) | |
| $DAEMON stop | |
| sleep 3 | |
| $DAEMON start | |
| sleep 1 | |
| ifconfig $TAP_ADAPTER $TAP_ADDR | |
| ;; | |
| *) | |
| echo "Usage: $0 {start|stop|restart}" | |
| exit 1 | |
| esac | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment