-
Notifications
You must be signed in to change notification settings - Fork 7
/
start.sh
103 lines (90 loc) · 4.55 KB
/
start.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/env bash
#####################################################
# This is the entry point for configuring the system.
# Source https://mailinabox.email/ https://github.com/mail-in-a-box/mailinabox
# Updated by afiniel for crypto use...
#####################################################
source /etc/functions.sh
source /etc/yiimpool.conf
# Ensure Python reads/writes files in UTF-8. If the machine
# triggers some other locale in Python, like ASCII encoding,
# Python may not be able to read/write files. This is also
# in the management daemon startup script and the cron script.
if ! locale -a | grep en_US.utf8 > /dev/null; then
# Generate locale if not exists
hide_output locale-gen en_US.UTF-8
fi
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_TYPE=en_US.UTF-8
# Fix so line drawing characters are shown correctly in Putty on Windows. See #744.
export NCURSES_NO_UTF8_ACS=1
# Create the temporary installation directory if it doesn't already exist.
echo -e "$YELLOW Creating the temporary YiiMP installation folder...$COL_RESET"
if [ ! -d $STORAGE_ROOT/yiimp/yiimp_setup ]; then
sudo mkdir -p $STORAGE_ROOT/{wallets,yiimp/{yiimp_setup/log,site/{web,stratum,configuration,crons,log},starts}}
sudo touch $STORAGE_ROOT/yiimp/yiimp_setup/log/installer.log
fi
echo -e "$GREEN Folders created...$COL_RESET"
# Start the installation.
source menu.sh
source questions.sh
source $HOME/yiimpool/yiimp_single/.wireguard.install.cnf
if [[ ("$wireguard" == "true") ]]; then
source wireguard.sh
fi
source system.sh
source self_ssl.sh
source db.sh
source nginx_upgrade.sh
source web.sh
source stratum.sh
source daemon.sh
# if [[ ("$UsingDomain" == "yes") ]]; then
# source send_mail.sh
# fi
source server_cleanup.sh
source motd.sh
source server_harden.sh
source $STORAGE_ROOT/yiimp/.yiimp.conf
clear
if [[ ("$UsingDomain" == "yes") ]]; then
echo -e "Installation of your Yiimpool Yiimp v2.1 is now completed."
echo -e "You $RED*MUST REBOOT*$COL_RESET the machine to finalize the machine updates and folder permissions! $MAGENTA YiiMP will not function until a reboot is performed!$COL_RESET"
echo
echo -e "$YELLOW Important!$COL_RESET After first reboot it may take up to 1 minute for the main|loop2|blocks|debug screens to start!"
echo -e "If they show$RED stopped$COL_RESET, after 1 minute, type$GREEN motd$COL_RESET to refresh the screen."
echo
echo -e "You can access your admin panel at,$BLUE http://${DomainName}/site/${AdminPanel} $COL_RESET"
echo
echo -e "$RED By default all stratum ports are blocked by the firewall.$COL_RESET To allow a port through, from the command prompt type $GREEN sudo ufw allow port number.$COL_RESET"
echo "Database user names and passwords can be found in $STORAGE_ROOT/yiimp_setup/.my.cnf"
else
echo -e "Installation of your Yiimpool Yiimp v2.1 is now completed."
echo -e "You $RED*MUST REBOOT*$COL_RESET the machine to finalize the machine updates and folder permissions! $MAGENTA YiiMP will not function until a reboot is performed!$COL_RESET"
echo
echo -e "$YELLOW Important!$COL_RESET After first reboot it may take up to 1 minute for the main|loop2|blocks|debug screens to start!"
echo -e "If they show$RED stopped$COL_RESET, after 1 minute, type$GREEN motd$COL_RESET to refresh the screen."
echo
echo -e "You can access your admin panel at,$BLUE http://${DomainName}/site/${AdminPanel} $COL_RESET"
echo -e "You will be alerted that the website has an invalid certificate."
echo
echo -e "$RED By default all stratum ports are blocked by the firewall.$COL_RESET To allow a port through, from the command prompt type $GREEN sudo ufw allow port number.$COL_RESET"
echo "Database user names and passwords can be found in $STORAGE_ROOT/yiimp_setup/.my.cnf"
fi
echo
echo -e "$YELLOW Happy mining $COL_RESET"
echo "----------------------------------------------------------------------------"
echo
echo -e "$GREEN Thank you for using Afiniel Yiimpool Installer v2.1!$COL_RESET"
echo
echo -e "$YELLOW To run this installer anytime simply type, $GREEN yiimpool $COL_RESET"
echo -e "$YELLOW If you want to support by donate, use wallet below $COL_RESET"
echo
echo -e "$YELLOW BTC:$COL_RESET $GREEN bc1q582gdvyp09038hp9n5sfdtp0plkx5x3yrhq05y $COL_RESET"
echo -e "$YELLOW BCH:$COL_RESET $GREEN qzz0aff2k0xnwyzg7k9fcxlndtaj4wa65uxteqe84m $COL_RESET"
echo -e "$YELLOW ETH:$COL_RESET $GREEN 0x50C7d0BF9714dBEcDc1aa6Ab0E72af8e6Ce3b0aB $COL_RESET"
echo -e "$YELLOW DOGE:$COL_RESET $GREEN DSzcmyCRi7JeN4XUiV2qYhRQAydNv7A1Yb $COL_RESET"
echo "----------------------------------------------------------------------------"
exit 0