-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script for installing cosmos exporter
- Loading branch information
1 parent
a919716
commit f4fd2a0
Showing
1 changed file
with
36 additions
and
0 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 @@ | ||
#!/usr/bin/env bash | ||
|
||
BOND_DENOM=usei | ||
BENCH_PREFIX=sei | ||
|
||
echo -e "\e[1m\e[32m1. Installing cosmos-exporter... \e[0m" && sleep 1 | ||
# install cosmos-exporter | ||
go build -o build/sei-cosmos-exporter | ||
sudo mv ./sei-cosmos-exporter /usr/bin | ||
|
||
sudo useradd -rs /bin/false cosmos_exporter | ||
|
||
sudo tee <<EOF >/dev/null /etc/systemd/system/cosmos-exporter.service | ||
[Unit] | ||
Description=Cosmos Exporter | ||
After=network-online.target | ||
[Service] | ||
User=cosmos_exporter | ||
Group=cosmos_exporter | ||
TimeoutStartSec=0 | ||
CPUWeight=95 | ||
IOWeight=95 | ||
ExecStart=/usr/bin/sei-cosmos-exporter --denom $BOND_DENOM --denom-coefficient 1000000 --bech-prefix $BENCH_PREFIX | ||
Restart=always | ||
RestartSec=2 | ||
LimitNOFILE=800000 | ||
KillSignal=SIGTERM | ||
[Install] | ||
WantedBy=multi-user.target | ||
EOF | ||
|
||
sudo systemctl daemon-reload | ||
sudo systemctl enable cosmos-exporter | ||
sudo systemctl start cosmos-exporter |