Created
November 23, 2015 09:54
-
-
Save m-tana/1505cfaa426c0646faf4 to your computer and use it in GitHub Desktop.
Softether Script for x86_64 CentOS
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 | |
wget -c http://jp.softether-download.com/files/softether/v4.18-9570-rtm-2015.07.26-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.18-9570-rtm-2015.07.26-linux-x64-64bit.tar.gz && | |
tar zxvf softether-vpnserver-v4.18-9570-rtm-2015.07.26-linux-x64-64bit.tar.gz && | |
yum groupinstall "Development Tools" && | |
cd vpnserver && | |
make && | |
cd .. && | |
mv vpnserver /usr/local && | |
cd /usr/local/vpnserver/ && | |
chmod 600 * && | |
chmod 700 vpnserver && | |
chmod 700 vpncmd && | |
cat <<EOT >> /etc/init.d/vpnserver | |
#!/bin/sh | |
# chkconfig: 2345 99 01 | |
# description: SoftEther VPN Server | |
DAEMON=/usr/local/vpnserver/vpnserver | |
LOCK=/var/lock/subsys/vpnserver | |
test -x $DAEMON || exit 0 | |
case "$1" in | |
start) | |
$DAEMON start | |
touch $LOCK | |
;; | |
stop) | |
$DAEMON stop | |
rm $LOCK | |
;; | |
restart) | |
$DAEMON stop | |
sleep 3 | |
$DAEMON start | |
;; | |
*) | |
echo "Usage: $0 {start|stop|restart}" | |
exit 1 | |
esac | |
exit 0 | |
EOT | |
chmod 755 /etc/init.d/vpnserver && /etc/init.d/vpnserver start && | |
chkconfig --add vpnserver | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment