-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
130 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
BASEDIR="$0" | ||
while [ -h "$BASEDIR" ]; do | ||
ls=$(ls -ld "$BASEDIR") | ||
link=$(expr "$ls" : '.*-> \(.*\)$') | ||
if expr "$link" : '/.*' > /dev/null; then | ||
BASEDIR="$link" | ||
else | ||
BASEDIR="$(dirname "$BASEDIR")/$link" | ||
fi | ||
done | ||
BASEDIR="$(dirname "$BASEDIR")" | ||
BASEDIR="$(cd "$BASEDIR"; pwd)" | ||
|
||
SERVICE_NAME="${1-}" | ||
|
||
if [ -z "$SERVICE_NAME" ]; then | ||
echo "Mising parameter: SERVICE_NAME" | ||
exit 255 | ||
fi | ||
|
||
echo $BASEDIR | ||
echo $SERVICE_NAME | ||
|
||
export DAEMON_NAME="sifnoded" | ||
export DAEMON_HOME="$BASEDIR/$SERVICE_NAME" | ||
export DAEMON_ALLOW_DOWNLOAD_BINARIES="true" | ||
export DAEMON_RESTART_AFTER_UPGRADE="true" | ||
export UNSAFE_SKIP_BACKUP="true" | ||
|
||
echo "Running cosmovisor for ${SERVICE_NAME} in ${DAEMON_HOME}..." | ||
|
||
"$BASEDIR/cosmovisor" start --home "${DAEMON_HOME}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description="sifchain node %I" | ||
After=network-online.target | ||
|
||
[Service] | ||
User=sif | ||
ExecStart=/home/sif/testnet/sifnode/sifnoded.sh %i | ||
Restart=always | ||
RestartSec=15 | ||
LimitNOFILE=4096 | ||
# SyslogIdentifier=sifnoded-%i | ||
StandardOutput=append:/home/sif/testnet/sifnode/%i/sifnoded.log | ||
StandardError=inherit | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains 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
This file contains 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
This file contains 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
This file contains 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