Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
d847202d
Commit
d847202d
authored
Feb 11, 2014
by
Igor Pečovnik
Browse files
VPN server install
parent
918652ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
install.sh
View file @
d847202d
...
...
@@ -17,7 +17,7 @@ fi
# What do we need anyway
apt-get update
apt-get
-y
upgrade
apt-get
-y
install
dnsutils unzip whiptail git build-essential alsa-base alsa-utils stunnel4
apt-get
-y
install
dnsutils unzip whiptail git build-essential alsa-base alsa-utils stunnel4
html2text
install_basic
(){
#############################################################################
...
...
@@ -159,6 +159,65 @@ EOF
}
#############################################################################
install_vpn_server
(){
#############################################################################
# valid only for ARM installation, script downloads latest stable
PREFIX
=
"http://www.softether-download.com/files/softether/"
URL
=
$(
wget
-q
$PREFIX
-O
- | html2text |
grep
rtm |
awk
' { print $(NF) }'
|
tail
-1
)
SUFIX
=
"
${
URL
/-tree/
}
"
DLURL
=
$PREFIX$URL
"/Linux/SoftEther%20VPN%20Server/32bit%20-%20ARM%20legacy%20ABI/softether-vpnserver-
$SUFIX
-linux-arm-32bit.tar.gz"
wget
$DLURL
tar
xfz softether-vpnserver-
$SUFIX
-linux-arm-32bit
.tar.gz
rm
softether-vpnserver-
$SUFIX
-linux-arm-32bit
.tar.gz
cd
vpnserver
make i_read_and_agree_the_license_agreement
cd
..
mv
vpnserver /usr/local
cd
/usr/local/vpnserver/
chmod
600
*
chmod
700 vpncmd
chmod
700 vpnserver
cat
<<
EOT
> /etc/init.d/vpnserver
#!/bin/sh
### BEGIN INIT INFO
# Provides: vpnserver
# Required-Start:
\$
remote_fs
\$
syslog
# Required-Stop:
\$
remote_fs
\$
syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable Softether by daemon.
### END INIT INFO
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
mkdir
/var/lock/subsys
update-rc.d vpnserver defaults
/etc/init.d/vpnserver start
}
#############################################################################
install_DashNTP
(){
#############################################################################
echo
"dash dash/sh boolean false"
| debconf-set-selections
...
...
@@ -434,6 +493,7 @@ install_scaner_and_scanbuttons
install_ocr
install_cups
install_btsync
install_vpn_server
apt-get
-y
install
tvheadend
apt-get
-y
install
transmission-cli transmission-common transmission-daemon
install_ISPConfig
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment