Skip to content

Commit

Permalink
Update mun.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
0xheycat authored Sep 29, 2022
1 parent 93a2b77 commit a03d9a5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions MUN/mun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,18 @@ source ~/.profile

echo -e "\e[1m\e[32m3. Downloading and building binaries... \e[0m" && sleep 1
# download binary
cd $HOME
cd $HOME && rm $HOME/mun -rf
git clone https://github.com/munblockchain/mun && cd mun
sudo rm -rf ~/.mun
go mod tidy
make install

mkdir -p ~/.mun/upgrade_manager/upgrades
mkdir -p ~/.mun/upgrade_manager/genesis/bin

# config
mund config chain-id $MUN_CHAIN_ID
mund config keyring-backend test

#Fetch genesis
curl --tlsv1 https://node1.mun.money/genesis? | jq ".result.genesis" > ~/.mun/config/genesis.json

Expand All @@ -70,6 +73,11 @@ sed -i 's/stake/utmun/g' ~/.mun/config/genesis.json
peers="[email protected]:26656"
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.mun/config/config.toml

# custom pruning
sed -i 's|pruning = "default"|pruning = "custom"|g' $HOME/.mund/config/app.toml
sed -i 's|pruning-keep-recent = "0"|pruning-keep-recent = "100"|g' $HOME/.mund/config/app.toml
sed -i 's|pruning-interval = "0"|pruning-interval = "10"|g' $HOME/.mund/config/app.toml

# create service
sudo tee /etc/systemd/system/mund.service > /dev/null << EOF
[Unit]
Expand All @@ -90,6 +98,8 @@ PermissionsStartOnly=true
ExecStart=/usr/bin/mund-manager start --pruning="nothing" --rpc.laddr "tcp://0.0.0.0:26657" --home $HOME/.mun
StandardOutput=file:/var/log/mund/mund.log
StandardError=file:/var/log/mund/mund_error.log
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGTERM
LimitNOFILE=4096
[Install]
Expand Down

0 comments on commit a03d9a5

Please sign in to comment.