Skip to content

Commit

Permalink
chore: move pi install scripts in special folder
Browse files Browse the repository at this point in the history
  • Loading branch information
bumi committed Aug 6, 2024
1 parent c219235 commit e26693a
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
8 changes: 5 additions & 3 deletions nip47/event_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,17 @@ func (svc *nip47Service) HandleEvent(ctx context.Context, relay nostrmodels.Rela
err = svc.publishResponseEvent(ctx, relay, &requestEvent, resp, &app)
if err != nil {
logger.Logger.WithFields(logrus.Fields{
"requestEventNostrId": event.ID,
"eventKind": event.Kind,
"appId": app.ID,
"requestEventNostrId": event.ID,
"responseEventNostrId": resp.ID,
"eventKind": event.Kind,
"appId": app.ID,
}).WithError(err).Error("Failed to publish event")
requestEvent.State = db.REQUEST_EVENT_STATE_HANDLER_ERROR
} else {
requestEvent.State = db.REQUEST_EVENT_STATE_HANDLER_EXECUTED
logger.Logger.WithFields(logrus.Fields{
"requestEventNostrId": event.ID,
"responseEventNostrId": resp.ID,
"eventKind": event.Kind,
"appId": app.ID,
}).Info("Published response")
Expand Down
11 changes: 0 additions & 11 deletions scripts/README.md

This file was deleted.

25 changes: 25 additions & 0 deletions scripts/pi-arm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### Installation on a Raspberry Pi Zero

Have a look at our [installation guide](https://guides.getalby.com/user-guide/v/alby-account-and-browser-extension/alby-hub/alby-hub-flavors/raspberry-pi-zero) for more details.

```shell
$ ssh [email protected] '/bin/bash -c "$(curl -fsSL https://getalby.com/install/hub/pi-zero-install.sh)"'
```

or on the Pi directly:
```shell
/bin/bash -c "$(curl -fsSL https://getalby.com/install/hub/pi-zero-install.sh)"
```

### Updating a running instance

```shell
$ ssh [email protected] '/bin/bash -c "$(curl -fsSL https://getalby.com/install/hub/pi-zero-install.sh)"'
```

or on the Pi directly:
```shell
/bin/bash -c "$(curl -fsSL https://getalby.com/install/hub/pi-zero-update.sh)"
```

And see install.sh and update.sh for details.
6 changes: 5 additions & 1 deletion scripts/install.sh → scripts/pi-arm/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ wget https://getalby.com/install/hub/server-linux-armv6.tar.bz2

# Extract archives
tar -xvf server-linux-armv6.tar.bz2
if [[ $? -eq 0 ]]; then
echo "Failed to unpack Alby Hub. Potentially bzip2 is missing"
echo "Install it with sudo apt-get install bzip2"
fi

# Cleanup
rm server-linux-armv6.tar.bz2
Expand All @@ -27,7 +31,7 @@ Wants=network-online.target
Type=simple
Restart=always
RestartSec=1
User=root
User=$USER
ExecStart=/opt/albyhub/bin/albyhub
# Hack to ensure Alby Hub never uses more than 90% CPU
CPUQuota=90%
Expand Down
File renamed without changes.

0 comments on commit e26693a

Please sign in to comment.