Skip to content

Instantly share code, notes, and snippets.

@m-tana
Created November 23, 2015 09:54
Show Gist options
  • Save m-tana/1505cfaa426c0646faf4 to your computer and use it in GitHub Desktop.
Save m-tana/1505cfaa426c0646faf4 to your computer and use it in GitHub Desktop.
Softether Script for x86_64 CentOS
#!/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