-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-rpc.sh
More file actions
executable file
·41 lines (36 loc) · 1.15 KB
/
start-rpc.sh
File metadata and controls
executable file
·41 lines (36 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Besu 25.7.0 - RPC NODE
# Updated to match current RPC configuration with 25.7.0 compatibility fixes
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=65536
WorkingDirectory=/home/$USER/node/
ExecStart=/home/$USER/besu/bin/besu --config-file=/home/$USER/node-install/configs/rpc/config.toml
[Install]
WantedBy=multi-user.target
" | sudo tee kaly.service
# Configure journald
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 -
# 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
echo