Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
feat: rpi scripts (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
reneaaron authored Jul 1, 2024
1 parent 8efe0d4 commit b35b006
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
12 changes: 7 additions & 5 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
19 changes: 11 additions & 8 deletions scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."

0 comments on commit b35b006

Please sign in to comment.