forked from Lozy/danted
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
34 lines (29 loc) · 918 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# Dante Socks5 Server AutoInstall
# -- Owner: https://www.inet.no/dante
# -- Provider: https://sockd.info
# -- Author: Lozy
#
REQUEST_SERVER="https://raw.github.com/sembruk/danted/master"
SYSTEM_RECOGNIZE=""
if [ -s "/etc/os-release" ];then
os_name=$(sed -n 's/PRETTY_NAME="\(.*\)"/\1/p' /etc/os-release)
if [ -n "$(echo ${os_name} | grep -Ei 'Debian|Ubuntu' )" ];then
printf "Current OS: %s\n" "${os_name}"
SYSTEM_RECOGNIZE="debian"
else
printf "Current OS: %s is not support.\n" "${os_name}"
fi
else
printf "[Error] (/etc/os-release) not exist!\n"
printf "[Error] Current OS: is not available to support.\n"
fi
if [ -n "$SYSTEM_RECOGNIZE" ];then
wget -qO- --no-check-certificate ${REQUEST_SERVER}/install_${SYSTEM_RECOGNIZE}.sh | \
bash -s -- $*
else
printf "[Error] Installing terminated"
exit 1
fi
exit 0