This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# systemd service to run and monitor Nostream (Nostr TS Relay) automatically. | |
# Assumes that the user `nostr` exists and that the relay code is located | |
# in the directory `/home/nostr/nostream`. | |
[Unit] | |
Description=Nostr TS Relay | |
After=network.target | |
StartLimitIntervalSec=0 | |
[Service] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Mirrors notes from one nostr relay to another. | |
# | |
# Example usage: | |
# nostr-mirror.sh wss://source.relay.example wss://target.relay.example | |
# Source relay to fetch events from (wss://...). | |
SOURCE=$1 | |
# Target relay to send these events to (wss://...). | |
TARGET=$2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sends a health check ping to the Amboss API. | |
# Docs: https://docs.amboss.space/api/monitoring/health-checks | |
URL="https://api.amboss.space/graphql" | |
NOW=$(date -u +%Y-%m-%dT%H:%M:%S%z) | |
echo "Timestamp: ${NOW}" | |
SIGNATURE=$(lightning-cli signmessage "$NOW" | jq -r .zbase) | |
echo "Signature: ${SIGNATURE}" | |
JSON="{\"query\": \"mutation HealthCheck(\$signature: String!, \$timestamp: String!) { healthCheck(signature: \$signature, timestamp: \$timestamp) }\", \"variables\": {\"signature\": \"$SIGNATURE\", \"timestamp\": \"$NOW\"}}" | |
echo "Sending ping..." |