Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: linux update script improvements #978

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions scripts/linux-x86_64/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ echo "You will have to unlock Alby Hub after the update."
echo ""
echo "Make sure you have your unlock password available and a backup of your seed."

read -p "Do you want continue? (y/n): " -n 1 -r
read -p "Do you want continue? (y/n):" -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit
fi
echo ""

sudo systemctl list-units --type=service --all | grep -Fq albyhub.service
if [[ $? -eq 0 ]]; then
Expand All @@ -28,10 +29,17 @@ then
pkill -f albyhub
fi

SCRIPT_DIR=$(dirname "$0")
read -p "Absolute install directory path (default: $SCRIPT_DIR/albyhub): " USER_INSTALL_DIR
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
read -p "Absolute install directory path (default: $SCRIPT_DIR): " USER_INSTALL_DIR
echo ""

INSTALL_DIR="${USER_INSTALL_DIR:-$SCRIPT_DIR}"

if ! test -f $INSTALL_DIR/data/nwc.db; then
echo "Could not find Alby Hub in this directory"
exit 1
fi

INSTALL_DIR="${USER_INSTALL_DIR:-$SCRIPT_DIR/albyhub}"

echo "Running in $INSTALL_DIR"
# make sure we run this in the install directory
Expand Down
Loading