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 done
if [ -z "$latest_entry" ]; then 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 exit 1
fi fi
@ -88,10 +88,10 @@ get_log_info() {
done done
if [ ! -f "$DATA_DIR/.admin_connect" ] && [ ! -f "$DATA_DIR/app.nprofile" ]; then 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 exit 1
elif [ -f "$DATA_DIR/.admin_connect" ] && ! [[ $(cat "$DATA_DIR/.admin_connect") == nprofile1* ]] && ! [[ $(cat "$DATA_DIR/.admin_connect") == *:* ]]; then 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 exit 1
fi fi
} }

View file

@ -27,7 +27,7 @@ log_error() {
exit $2 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=( modules=(
"utils" "utils"

View file

@ -11,31 +11,31 @@ install_lightning_pub() {
USER_NAME=$(whoami) USER_NAME=$(whoami)
fi fi
log "Checking for build essentials..." # log "Checking for build essentials..."
if [ "$OS" = "Linux" ]; then # if [ "$OS" = "Linux" ]; then
if command -v gcc &> /dev/null && command -v make &> /dev/null; then # if command -v gcc &> /dev/null && command -v make &> /dev/null; then
log "Build essentials already installed." # log "Build essentials already installed."
else # else
log "Installing build essentials..." # log "Installing build essentials..."
if command -v apt-get &> /dev/null; then # if command -v apt-get &> /dev/null; then
log "Using apt-get to install build-essential" # log "Using apt-get to install build-essential"
sudo apt-get update > /dev/null 2>&1 # sudo apt-get update > /dev/null 2>&1
sudo apt-get install -y build-essential > /dev/null 2>&1 # sudo apt-get install -y build-essential > /dev/null 2>&1
elif command -v yum &> /dev/null; then # elif command -v yum &> /dev/null; then
log "Using yum to install Development Tools" # log "Using yum to install Development Tools"
sudo yum groupinstall -y "Development Tools" > /dev/null 2>&1 # sudo yum groupinstall -y "Development Tools" > /dev/null 2>&1
else # else
log "Unable to install build essentials. Neither apt-get nor yum found." # log "Unable to install build essentials. Neither apt-get nor yum found."
return 1 # return 1
fi # fi
log "Build essentials installation attempt completed." # log "Build essentials installation attempt completed."
fi # fi
else # else
log "Not on Linux, skipping build essentials check." # log "Not on Linux, skipping build essentials check."
fi # fi
log "${PRIMARY_COLOR}Installing${RESET_COLOR} ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR}..." 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 || { 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}" log "${PRIMARY_COLOR}Failed to download Lightning.Pub.${RESET_COLOR}"