feat: rpi scripts (#513)

This commit is contained in:
René Aaron 2024-07-01 10:02:12 +02:00 committed by GitHub
parent 8efe0d41fe
commit b35b00619e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 13 deletions

View file

@ -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"

View file

@ -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."