-
Notifications
You must be signed in to change notification settings - Fork 7
/
menu.sh
44 lines (38 loc) · 1.07 KB
/
menu.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
#!/usr/bin/env bash
#####################################################
# Source code https://github.com/end222/pacmenu
# Updated by afiniel for crypto use...
#####################################################
source /etc/functions.sh
RESULT=$(dialog --stdout --default-item 1 --title "Yiimpool Yiimp installer v2.1" --menu "Choose one" -1 60 6 \
' ' "- Without wireguard installed use the following option -" \
1 "YiiMP - server without wireguard installed" \
' ' "- If you plan on adding more servers later use the following option -" \
2 "YiiMP - Server with WireGuard installed" \
3 Exit)
if [ $RESULT = ]
then
bash $(basename $0) && exit;
fi
if [ $RESULT = 1 ]
then
clear;
echo '
wireguard=false
' | sudo -E tee $HOME/yiimpool/yiimp_single/.wireguard.install.cnf >/dev/null 2>&1;
fi
if [ $RESULT = 2 ]
then
clear;
echo '
wireguard=true
' | sudo -E tee $HOME/yiimpool/yiimp_single/.wireguard.install.cnf >/dev/null 2>&1;
echo 'server_type='db'
DBInternalIP='10.0.0.2'
' | sudo -E tee $STORAGE_ROOT/yiimp/.wireguard.conf >/dev/null 2>&1;
fi
if [ $RESULT = 3 ]
then
clear;
exit;
fi