This commit is contained in:
Justin (shocknet) 2024-08-15 21:25:51 -04:00
parent ccab37d7b7
commit 02d2ab1ee7
3 changed files with 27 additions and 27 deletions

View file

@ -46,7 +46,7 @@ get_log_info() {
done
if [ -z "$latest_entry" ]; then
log "Error: Failed to retrieve wallet status. Please check the service logs."
log "Can't retrieve wallet status, check the service logs."
exit 1
fi
@ -88,10 +88,10 @@ get_log_info() {
done
if [ ! -f "$DATA_DIR/.admin_connect" ] && [ ! -f "$DATA_DIR/app.nprofile" ]; then
log "Error: Neither .admin_connect nor app.nprofile file found after waiting. Please check the service status."
log "Neither .admin_connect nor app.nprofile file found after waiting. Please check the service status."
exit 1
elif [ -f "$DATA_DIR/.admin_connect" ] && ! [[ $(cat "$DATA_DIR/.admin_connect") == nprofile1* ]] && ! [[ $(cat "$DATA_DIR/.admin_connect") == *:* ]]; then
log "Error: Admin connect information is incomplete. Please check the service status."
log "Admin connect information is incomplete. Please check the service status."
exit 1
fi
}

View file

@ -27,7 +27,7 @@ log_error() {
exit $2
}
BASE_URL="https://raw.githubusercontent.com/shocknet/Lightning.Pub/fix-arm/scripts/"
BASE_URL="https://raw.githubusercontent.com/shocknet/Lightning.Pub/master/scripts/"
modules=(
"utils"

View file

@ -11,31 +11,31 @@ install_lightning_pub() {
USER_NAME=$(whoami)
fi
log "Checking for build essentials..."
if [ "$OS" = "Linux" ]; then
if command -v gcc &> /dev/null && command -v make &> /dev/null; then
log "Build essentials already installed."
else
log "Installing build essentials..."
if command -v apt-get &> /dev/null; then
log "Using apt-get to install build-essential"
sudo apt-get update > /dev/null 2>&1
sudo apt-get install -y build-essential > /dev/null 2>&1
elif command -v yum &> /dev/null; then
log "Using yum to install Development Tools"
sudo yum groupinstall -y "Development Tools" > /dev/null 2>&1
else
log "Unable to install build essentials. Neither apt-get nor yum found."
return 1
fi
log "Build essentials installation attempt completed."
fi
else
log "Not on Linux, skipping build essentials check."
fi
# log "Checking for build essentials..."
# if [ "$OS" = "Linux" ]; then
# if command -v gcc &> /dev/null && command -v make &> /dev/null; then
# log "Build essentials already installed."
# else
# log "Installing build essentials..."
# if command -v apt-get &> /dev/null; then
# log "Using apt-get to install build-essential"
# sudo apt-get update > /dev/null 2>&1
# sudo apt-get install -y build-essential > /dev/null 2>&1
# elif command -v yum &> /dev/null; then
# log "Using yum to install Development Tools"
# sudo yum groupinstall -y "Development Tools" > /dev/null 2>&1
# else
# log "Unable to install build essentials. Neither apt-get nor yum found."
# return 1
# fi
# log "Build essentials installation attempt completed."
# fi
# else
# log "Not on Linux, skipping build essentials check."
# fi
log "${PRIMARY_COLOR}Installing${RESET_COLOR} ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR}..."
REPO_URL="https://github.com/shocknet/Lightning.Pub/tarball/fix-arm"
REPO_URL="https://github.com/shocknet/Lightning.Pub/tarball/master"
sudo -u $USER_NAME wget -q $REPO_URL -O $USER_HOME/lightning_pub.tar.gz > /dev/null 2>&1 || {
log "${PRIMARY_COLOR}Failed to download Lightning.Pub.${RESET_COLOR}"