diff --git a/scripts/linux-aarch64/install.sh b/scripts/linux-aarch64/install.sh index ee9bcd7f..7024ebef 100644 --- a/scripts/linux-aarch64/install.sh +++ b/scripts/linux-aarch64/install.sh @@ -89,8 +89,15 @@ echo "Installing to: $INSTALL_DIR" mkdir -p "$INSTALL_DIR" cd "$INSTALL_DIR" || exit 1 +# check bzip2 is available before downloading +if ! command -v bzip2 > /dev/null 2>&1; then + echo "❌ bzip2 is required but not installed. Run: sudo apt-get install -y bzip2" >&2 + exit 1 +fi + # download and extract the Alby Hub executable -if ! wget "$ALBYHUB_URL"; then +echo "Downloading Alby Hub..." +if ! wget -q "$ALBYHUB_URL"; then echo "❌ Failed to download Alby Hub package." >&2 exit 1 fi @@ -111,7 +118,7 @@ if [ "$SKIP_VERIFY" = false ]; then fi fi -if ! tar xvf server-linux-aarch64.tar.bz2; then +if ! tar xf server-linux-aarch64.tar.bz2; then echo "Failed to unpack Alby Hub. Potentially bzip2 is missing" echo "Install it with sudo apt-get install bzip2" exit 1 @@ -133,7 +140,7 @@ chmod +x "$INSTALL_DIR/start.sh" # add an update script to keep the Hub up to date # run this to update the hub -wget https://raw.githubusercontent.com/getAlby/hub/master/scripts/linux-aarch64/update.sh +wget -q https://raw.githubusercontent.com/getAlby/hub/master/scripts/linux-aarch64/update.sh chmod +x "$INSTALL_DIR/update.sh" echo "" diff --git a/scripts/linux-aarch64/update.sh b/scripts/linux-aarch64/update.sh index f4b6d286..5eadbe67 100644 --- a/scripts/linux-aarch64/update.sh +++ b/scripts/linux-aarch64/update.sh @@ -109,7 +109,7 @@ mkdir albyhub-backup echo "Creating current backup" if command -v rsync > /dev/null 2>&1; then - rsync -av data bin lib albyhub-backup/ + rsync -a data bin lib albyhub-backup/ else mv bin albyhub-backup mv lib albyhub-backup @@ -118,7 +118,7 @@ fi echo "Downloading latest version" -wget "$ALBYHUB_URL" +wget -q "$ALBYHUB_URL" if [ "$SKIP_VERIFY" = false ]; then if ! ./verify.sh server-linux-aarch64.tar.bz2 albyhub-Server-Linux-aarch64.tar.bz2; then @@ -127,7 +127,7 @@ if [ "$SKIP_VERIFY" = false ]; then fi fi -tar -xvf server-linux-aarch64.tar.bz2 +tar -xf server-linux-aarch64.tar.bz2 rm server-linux-aarch64.tar.bz2 if sudo systemctl list-units --type=service --all | grep -Fq albyhub.service; then diff --git a/scripts/linux-x86_64/install.sh b/scripts/linux-x86_64/install.sh index 1547aa95..812a3b60 100644 --- a/scripts/linux-x86_64/install.sh +++ b/scripts/linux-x86_64/install.sh @@ -89,8 +89,15 @@ echo "Installing to: $INSTALL_DIR" mkdir -p "$INSTALL_DIR" cd "$INSTALL_DIR" || exit 1 +# check bzip2 is available before downloading +if ! command -v bzip2 > /dev/null 2>&1; then + echo "❌ bzip2 is required but not installed. Run: sudo apt-get install -y bzip2" >&2 + exit 1 +fi + # download and extract the Alby Hub executable -if ! wget "$ALBYHUB_URL"; then +echo "Downloading Alby Hub..." +if ! wget -q "$ALBYHUB_URL"; then echo "❌ Failed to download Alby Hub" >&2 exit 1 fi @@ -111,7 +118,7 @@ if [ "$SKIP_VERIFY" = false ]; then fi fi -if ! tar xvf server-linux-x86_64.tar.bz2; then +if ! tar xf server-linux-x86_64.tar.bz2; then echo "Failed to unpack Alby Hub. Potentially bzip2 is missing" echo "Install it with sudo apt-get install bzip2" exit 1 @@ -133,7 +140,7 @@ chmod +x "$INSTALL_DIR/start.sh" # add an update script to keep the Hub up to date # run this to update the hub -wget https://raw.githubusercontent.com/getAlby/hub/master/scripts/linux-x86_64/update.sh +wget -q https://raw.githubusercontent.com/getAlby/hub/master/scripts/linux-x86_64/update.sh chmod +x "$INSTALL_DIR/update.sh" echo "" diff --git a/scripts/linux-x86_64/update.sh b/scripts/linux-x86_64/update.sh index b1d2c064..e22cc52b 100644 --- a/scripts/linux-x86_64/update.sh +++ b/scripts/linux-x86_64/update.sh @@ -109,7 +109,7 @@ mkdir albyhub-backup echo "Creating current backup" if command -v rsync > /dev/null 2>&1; then - rsync -av data bin lib albyhub-backup/ + rsync -a data bin lib albyhub-backup/ else mv bin albyhub-backup mv lib albyhub-backup @@ -118,7 +118,7 @@ fi echo "Downloading latest version" -wget "$ALBYHUB_URL" +wget -q "$ALBYHUB_URL" if [ "$SKIP_VERIFY" = false ]; then if ! ./verify.sh server-linux-x86_64.tar.bz2 albyhub-Server-Linux-x86_64.tar.bz2; then @@ -127,7 +127,7 @@ if [ "$SKIP_VERIFY" = false ]; then fi fi -tar -xvf server-linux-x86_64.tar.bz2 +tar -xf server-linux-x86_64.tar.bz2 rm server-linux-x86_64.tar.bz2 if sudo systemctl list-units --type=service --all | grep -Fq albyhub.service; then