Skip to content

Commit 448ec8d

Browse files
authored
Merge pull request #10 from afiniel/v2.3.0
V2.3.0
2 parents a09a9bc + 2f6ff26 commit 448ec8d

File tree

7 files changed

+80
-66
lines changed

7 files changed

+80
-66
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This installer provides an automated way to set up a full Yiimp mining pool on U
3737
## Quick Install
3838

3939
```bash
40-
curl https://raw.githubusercontent.com/afiniel/Yiimpoolv1/master/install.sh | sudo bash
40+
curl https://raw.githubusercontent.com/afiniel/Yiimpoolv1/master/install.sh | bash
4141
```
4242

4343
The installer will guide you through configuration options including:

daemon_builder/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
################################################################################
1111

1212
if [ -z "${TAG}" ]; then
13-
TAG=v2.2.9
13+
TAG=v2.3.0
1414
fi
1515

1616
clear

daemon_builder/requirements.sh

Lines changed: 51 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,72 +3,80 @@
33
#
44
# Author: Afiniel
55
# Date: 2023-01-12
6-
#
7-
# Updated 2024-07-15
8-
# Description: Installs all requirements for DaemonBuilder.
9-
#
6+
#
7+
# Description: This install all requirements for DaemonBuilder.
8+
#
109

11-
# Load functions and configurations
10+
# Load functions
1211
source /etc/functions.sh
1312
source /etc/yiimpool.conf
14-
source "$STORAGE_ROOT/yiimp/.yiimp.conf"
13+
source $STORAGE_ROOT/yiimp/.yiimp.conf
1514

16-
set -euo pipefail
15+
set -eu -o pipefail
1716

1817
function print_error {
19-
read line file <<<$(caller)
20-
echo "An error occurred in line $line of file $file:" >&2
21-
sed "${line}q;d" "$file" >&2
18+
read line file <<<$(caller)
19+
echo "An error occurred in line $line of file $file:" >&2
20+
sed "${line}q;d" "$file" >&2
2221
}
2322
trap print_error ERR
2423

25-
# Change directory to DaemonBuilder
26-
cd "$HOME/Yiimpoolv1/daemon_builder"
27-
28-
# Copy screen-scrypt-daemonbuilder.sh and set permissions
29-
hide_output sudo cp -r "$HOME/Yiimpoolv1/daemon_builder/utils/screen-scrypt-daemonbuilder.sh" /etc/
24+
cd $HOME/Yiimpoolv1/daemon_builder
25+
hide_output sudo cp -r $HOME/Yiimpoolv1/daemon_builder/utils/screen-scrypt-daemonbuilder.sh /etc/
3026
hide_output sudo chmod +x /etc/screen-scrypt-daemonbuilder.sh
3127

32-
if [[ "${DISTRO}" == "18" ]]; then
33-
apt_install libz-dev libminiupnpc10
34-
hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin
35-
hide_output sudo apt-get update
36-
hide_output sudo apt-get -y upgrade
37-
apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++
28+
#Install dependencies
29+
echo
30+
echo -e "$MAGENTA => Installing Package to compile crypto currency <= $NC"
31+
hide_output sudo apt-get update
32+
hide_output sudo apt-get -y upgrade
33+
hide_output sudo apt-get -y install p7zip-full
34+
apt_install build-essential libzmq5 libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils cmake libboost-all-dev zlib1g-dev \
35+
libseccomp-dev libcap-dev libminiupnpc-dev gettext libcanberra-gtk-module libqrencode-dev libzmq3-dev \
36+
libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
37+
38+
if [[ ("${DISTRO}" == "18") ]]; then
39+
apt_install libz-dev libminiupnpc10
40+
hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin
41+
hide_output sudo apt-get update
42+
hide_output sudo apt-get -y upgrade
43+
apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++
3844
fi
3945

4046
hide_output sudo apt -y install libdb5.3 libdb5.3++
41-
echo -e "$GREEN => Installation complete <=${NC}"
47+
echo -e "$GREEN => Complete <=$NC"
4248

43-
echo -e "\n$MAGENTA => Installing additional system files required for daemons <= ${NC}"
49+
echo
50+
echo -e "$MAGENTA => Installing additional system files required for daemons <= $NC"
4451
hide_output sudo apt-get update
4552
apt_install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev libboost-all-dev libminiupnpc-dev \
46-
libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler \
47-
libqrencode-dev libzmq3-dev libgmp-dev cmake libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev \
48-
libldns-dev libexpat1-dev libpgm-dev libhidapi-dev libusb-1.0-0-dev libudev-dev libboost-chrono-dev libboost-date-time-dev \
49-
libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev \
50-
libboost-system-dev libboost-thread-dev python3 ccache doxygen graphviz default-libmysqlclient-dev libnghttp2-dev \
51-
librtmp-dev libssh2-1 libssh2-1-dev libldap2-dev libidn11-dev libpsl-dev libnatpmp-dev systemtap-sdt-dev qtwayland5
52-
53-
if [[ "${DISTRO}" == "18" ]]; then
54-
hide_output sudo apt -y install libsqlite3-dev
53+
libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev libzmq3-dev \
54+
libgmp-dev cmake libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev libpgm-dev libhidapi-dev \
55+
libusb-1.0-0-dev libudev-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev \
56+
libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev python3 ccache doxygen graphviz default-libmysqlclient-dev \
57+
libnghttp2-dev librtmp-dev libssh2-1 libssh2-1-dev libldap2-dev libidn11-dev libpsl-dev libnatpmp-dev systemtap-sdt-dev qtwayland5
58+
59+
if [[ ("${DISTRO}" == "18") ]]; then
60+
hide_output sudo apt -y install ibsqlite3-dev
5561
else
56-
hide_output sudo apt -y install libdb-dev
57-
hide_output sudo apt -y install libdb5.3++ libdb5.3++-dev
62+
hide_output sudo apt -y install libdb-dev
63+
hide_output sudo apt -y install libdb5.3++ libdb5.3++-dev
5864
fi
5965

60-
echo -e "$GREEN => Additional system files installation complete <=${NC}"
66+
echo -e "$GREEN Additional System Files Completed...$NC"
67+
echo
6168

62-
# Update gcc & g++ to version 8
63-
echo -e "\n$CYAN => Updating gcc & g++ to version 8 ${NC}"
69+
# Updating gcc & g++ to version 8
70+
echo
71+
echo -e "$CYAN => Updating gcc & g++ to version 8 $NC"
6472
hide_output sudo apt-get update
6573
hide_output sudo apt-get -y upgrade
6674
apt_dist_upgrade
6775

6876
apt_install software-properties-common
6977

70-
if [[ "${DISTRO}" == "18" ]]; then
71-
hide_output sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
78+
if [[ ("${DISTRO}" == "18") ]]; then
79+
hide_output sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
7280
fi
7381
hide_output sudo apt-get update
7482

@@ -77,10 +85,8 @@ apt_install gcc-8 g++-8
7785
hide_output sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8
7886
hide_output sudo update-alternatives --config gcc
7987

80-
echo -e "$GREEN => gcc & g++ updated to version 8 <=${NC}"
81-
82-
set +euo pipefail
88+
echo -e "$GREEN gcc & g++ Updated...$NC"
8389

84-
# Return to DaemonBuilder directory and source berkeley.sh
85-
cd "$HOME/Yiimpoolv1/daemon_builder"
86-
source "$HOME/Yiimpoolv1/daemon_builder/berkeley.sh"
90+
set +eu +o pipefail
91+
cd $HOME/Yiimpoolv1/daemon_builder
92+
source $HOME/Yiimpoolv1/daemon_builder/berkeley.sh

install.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#########################################################
1616

1717
# Default version tag if not provided as environment variable
18-
TAG=${TAG:-v2.2.9}
18+
TAG=${TAG:-v2.3.0}
1919

2020
# File paths
2121
YIIMPOOL_VERSION_FILE="/etc/yiimpoolversion.conf"
@@ -67,14 +67,6 @@ start_installation() {
6767
bash "$YIIMPOOL_INSTALL_DIR/install/start.sh"
6868
}
6969

70-
# Main execution starts here
71-
72-
# Ensure the script is run with sudo privileges for setting Yiimpool version
73-
if [[ $EUID -ne 0 ]]; then
74-
log_error "This script must be run with sudo."
75-
exit 1
76-
fi
77-
7870
# Perform installation steps
7971
install_git
8072
clone_or_update_repo

install/functions.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,14 @@ install_if_not_installed() {
287287
fi
288288
}
289289

290+
# Function to check package installation status
291+
function check_package_installed() {
292+
if ! dpkg -l | grep -q "^ii $1"; then
293+
echo "Failed to install package: $1"
294+
return 1
295+
fi
296+
}
297+
290298
function apt_get_quiet {
291299
DEBIAN_FRONTEND=noninteractive hide_output sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" "$@"
292300
}

yiimp_single/questions.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,20 @@ if [[ "$UsingDomain" == "yes" ]]; then
9898
255) echo "[ESC] key pressed.";;
9999
esac
100100
else
101-
# Automatically set DomainName and StratumURL to server IP if not using a domain
101+
# Set DomainName and StratumURL to server IP if not using a domain
102102
DomainName=$(get_publicip_from_web_service 4 || get_default_privateip 4)
103103
StratumURL=${DomainName}
104104
UsingSubDomain=no
105-
InstallSSL=no
105+
106+
# Add SSL prompt even when using IP
107+
dialog --title "Install SSL" \
108+
--yesno "Would you like the system to install SSL automatically?\n\nNote: Self-signed SSL will be used when installing with IP address." 8 60
109+
response=$?
110+
case $response in
111+
0) InstallSSL=yes;;
112+
1) InstallSSL=no;;
113+
255) echo "[ESC] key pressed.";;
114+
esac
106115
fi
107116

108117
# Further prompts for support email, admin panel location, auto-exchange, dedicated coin ports, and public IP

yiimp_single/start.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@ export NCURSES_NO_UTF8_ACS=1
3030

3131
# Create the temporary installation directory if it doesn't already exist.
3232
if [ ! -d $STORAGE_ROOT/yiimp/yiimp_setup ]; then
33-
mkdir -p $STORAGE_ROOT/{wallets,yiimp/{yiimp_setup/log,site/{web,stratum,configuration,crons,log},starts}}
34-
touch $STORAGE_ROOT/yiimp/yiimp_setup/log/installer.log
33+
sudo mkdir -p $STORAGE_ROOT/{wallets,yiimp/{yiimp_setup/log,site/{web,stratum,configuration,crons,log},starts}}
34+
35+
sudo chown -R $STORAGE_USER:$STORAGE_USER $STORAGE_ROOT
36+
37+
sudo chmod +x $STORAGE_ROOT
38+
39+
sudo touch $STORAGE_ROOT/yiimp/yiimp_setup/log/installer.log
3540
fi
3641
echo
3742

@@ -107,12 +112,6 @@ print_message() {
107112
echo -e "${YIIMP_WHITE}Database usernames and passwords can be found in ${YIIMP_RED}$STORAGE_ROOT/yiimp/.my.cnf${YIIMP_RESET}"
108113
}
109114

110-
# Main script
111-
112-
source /etc/yiimpool.conf
113-
source /etc/yiimpoolversion.conf
114-
source /etc/functions.sh
115-
116115
term_yiimpool
117116

118117
# Call print_message regardless of UsingDomain

0 commit comments

Comments
 (0)