Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Commit

Permalink
Add watchtower script
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Mar 9, 2020
1 parent 0da97dc commit 766dfb4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 14 additions & 0 deletions scripts/watchtower.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -ex

#shellcheck source=/dev/null
. service-env.sh

trusted_validators=()
for tv in ${TRUSTED_VALIDATORS[@]}; do
trusted_validators+=(--validator-identity "$tv")
done

exec solana-watchtower \
--url "$RPC_URL" \
"${trusted_validators[@]}" \
4 changes: 1 addition & 3 deletions watchtower.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ StartLimitIntervalSec=0

[Service]
WorkingDirectory=/home/solanad
EnvironmentFile=/home/solanad/service-env.sh
Type=simple
Restart=always
RestartSec=1
User=solanad
LogRateLimitIntervalSec=0
ExecStart=/home/solanad/.local/share/solana/install/active_release/bin/solana-watchtower \
--url ${RPC_URL} \
ExecStart=/home/solanad/watchtower.sh

[Install]
WantedBy=multi-user.target

0 comments on commit 766dfb4

Please sign in to comment.