From b35b00619e7de18e0e0fd896a8fd71a2fc04ef1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= <100827540+reneaaron@users.noreply.github.com> Date: Mon, 1 Jul 2024 10:02:12 +0200 Subject: [PATCH] feat: rpi scripts (#513) --- scripts/install.sh | 12 +++++++----- scripts/update.sh | 19 +++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 13745c8af..b1b5a3aaf 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -8,11 +8,13 @@ echo "Installing..." sudo mkdir -p /opt/albyhub sudo chown -R $USER:$USER /opt/albyhub cd /opt/albyhub -wget https://nightly.link/getalby/nostr-wallet-connect-next/workflows/package-raspberry-pi/master/nostr-wallet-connect.zip +wget https://github.com/getAlby/nostr-wallet-connect-next/releases/latest/download/albyhub-Server-Linux-armv6.tar.bz2 -unzip nostr-wallet-connect.zip -d app -chmod +x app/nostr-wallet-connect -rm nostr-wallet-connect.zip +# Extract archives +tar -xvf albyhub-Server-Linux-armv6.tar.bz2 + +# Cleanup +rm albyhub-Server-Linux-armv6.tar.bz2 ### Create systemd service sudo tee -a /etc/systemd/system/albyhub.service > /dev/null << EOF @@ -26,7 +28,7 @@ Type=simple Restart=always RestartSec=1 User=root -ExecStart=/opt/albyhub/app/nostr-wallet-connect +ExecStart=/opt/albyhub/bin/albyhub Environment="PORT=80" Environment="WORK_DIR=/opt/albyhub/data" diff --git a/scripts/update.sh b/scripts/update.sh index aa0d75939..4988f70c2 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -3,17 +3,20 @@ echo "🔃 Updating Alby Hub..." sudo systemctl stop albyhub +# Download new artifacts cd /opt/albyhub -sudo rm -rf albyhub-backup +rm -rf albyhub-backup mkdir albyhub-backup -mv app albyhub-backup -sudo cp -r data albyhub-backup -wget https://nightly.link/getalby/nostr-wallet-connect-next/workflows/package-raspberry-pi/master/nostr-wallet-connect.zip +mv bin albyhub-backup +cp -r data albyhub-backup +wget https://github.com/getAlby/nostr-wallet-connect-next/releases/latest/download/albyhub-Server-Linux-armv6.tar.bz2 -unzip nostr-wallet-connect.zip -d app -chmod +x app/nostr-wallet-connect -rm nostr-wallet-connect.zip +# Extract archives +tar -xvf albyhub-Server-Linux-armv6.tar.bz2 + +# Cleanup +rm albyhub-Server-Linux-armv6.tar.bz2 sudo systemctl start albyhub -echo "✅ Update finished! Please visit http://$HOSTNAME.local to unlock your wallet." +echo "✅ Update finished! Please login again to start your wallet." \ No newline at end of file