-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
33 lines (27 loc) · 850 Bytes
/
setup.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
#!/bin/bash
# =====================================================
# This script used to setup ndt
# Part of https://github.com/wildy3128/ndt.git
# =====================================================
if ! [[ $(whoami) == "root" ]]; then
echo "This script required sudoer"
exit
fi
if ! command -V iptables > /dev/null 2>&1; then
echo "iptables not installed, please install and try again !"
exit
fi
if ! command -V ebtables > /dev/null 2>&1; then
echo "ebtables not installed, please install and try again !"
exit
fi
wget -q -O /usr/bin/ndt 'https://raw.githubusercontent.com/wildy3128/ndt/main/ndt.sh'
chmod 700 /usr/bin/ndt
if ! [[ $(echo -e '7' | /usr/bin/ndt | grep -w 'Existed.') ]] then
echo "Installation failed, please try again !"
exit
else
echo "Installation success,"
echo "NDT Has been installed"
exit
fi