Skip to content

Commit

Permalink
Script for installing cosmos exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonWeng committed Mar 29, 2023
1 parent a919716 commit f4fd2a0
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions install-sei-cosmos-exporter.sh
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

0 comments on commit f4fd2a0

Please sign in to comment.