forked from HamedAp/Ssh-User-management
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrook.sh
52 lines (42 loc) · 1.17 KB
/
brook.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
os=""
arch=""
if [ $(uname -s) = "Darwin" ]; then
os="darwin"
fi
if [ $(uname -s) = "Linux" ]; then
os="linux"
if [ `cat /etc/*elease 2>/dev/null | grep 'CentOS Linux 7' | wc -l` -eq 1 ]; then
echo "Requires CentOS version >= 8"
exit;
fi
fi
if [ $(uname -s | grep "MINGW" | wc -l) -eq 1 ]; then
os="windows"
fi
if [ $(uname -m) = "x86_64" ]; then
arch="amd64"
fi
if [ $(uname -m) = "arm64" ]; then
arch="arm64"
fi
if [ $(uname -m) = "aarch64" ]; then
arch="arm64"
fi
if [ "$os" = "" -o "$arch" = "" ]; then
echo "Nami does not support your OS/ARCH yet. Please submit issue or PR to https://github.com/txthinking/nami"
exit
fi
sfx=""
if [ $os = "windows" ]; then
sfx=".exe"
fi
mkdir -p $HOME/.nami/bin
curl -L -o $HOME/.nami/bin/nami$sfx "https://github.com/txthinking/nami/releases/latest/download/nami_${os}_${arch}$sfx"
chmod +x $HOME/.nami/bin/nami
echo 'export PATH=$HOME/.nami/bin:$PATH' >> $HOME/.bashrc
echo 'export PATH=$HOME/.nami/bin:$PATH' >> $HOME/.bash_profile
echo 'export PATH=$HOME/.nami/bin:$PATH' >> $HOME/.zshenv
sleep 2
nami install joker brook
joker brook server -l :9999 -p shahantest