Instructions on how to run a Full Node, Validator Node, and RPC Services for KalyChain.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Create systemd Service File
|
|
|
|
cd /etc/systemd/system
|
|
|
|
echo "Starting KalyChain..."
|
|
|
|
echo "
|
|
|
|
[Unit]
|
|
|
|
Description=Kaly Node Service
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
Restart=always
|
|
|
|
RestartSec=1
|
|
|
|
User=$USER
|
|
|
|
Group=$USER
|
|
|
|
LimitNOFILE=4096
|
|
|
|
WorkingDirectory=/home/$USER/node/
|
|
|
|
ExecStart=/home/$USER/node/../kaly/bin/besu --data-path=./kaly/node/data --genesis-file=./kaly/node/genesis.json --bootnodes=enode://bd1782617ae151ba6da627a35a1babc0a40ae127a718cdc13322acb357411f095d56db6141c99d7f8b63b7ce896ffffbadea34a4471bca297c916a94e1d9b818@169.197.143.129:30303 enode://3ea0e690890c824cb39867c9da0e201764ecd2960c2609ecceb40b3e48d374424f791d32d87eaf7430249649b5c45673178454455b22b133458afc5ddf126c3a@169.197.143.174:30303 --p2p-port=30303 --rpc-http-enabled=true --rpc-http-api=ETH,NET,WEB3,TRACE,TXPOOL --host-allowlist="*" --rpc-http-cors-origins="all" --revert-reason-enabled=true --rpc-http-port=8590
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
" | sudo tee kaly.service
|
|
|
|
|
|
|
|
if grep -q ForwardToSyslog=yes "/etc/systemd/journald.conf"; then
|
|
|
|
sudo sed -i '/#ForwardToSyslog=yes/c\ForwardToSyslog=no' /etc/systemd/journald.conf
|
|
|
|
sudo sed -i '/ForwardToSyslog=yes/c\ForwardToSyslog=no' /etc/systemd/journald.conf
|
|
|
|
elif ! grep -q ForwardToSyslog=no "/etc/systemd/journald.conf"; then
|
|
|
|
echo "ForwardToSyslog=no" | sudo tee -a /etc/systemd/journald.conf
|
|
|
|
fi
|
|
|
|
cd -
|
|
|
|
echo
|
|
|
|
|
|
|
|
# Start systemd Service
|
|
|
|
sudo systemctl force-reload systemd-journald
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
sudo systemctl start kaly.service
|
|
|
|
sudo systemctl enable kaly.service
|
|
|
|
|
|
|
|
read -n 1 -s -r -p "Service successfully started! Press any key to continue..."
|
|
|
|
echo
|