-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.sh
22 lines (15 loc) · 968 Bytes
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
git clone https://github.com/ytx1991/ChiaMonitor.git /root/ChiaMonitor
rm /root/ChiaMonitor/mtail
wget -c https://github.com/google/mtail/releases/download/v3.0.0-rc45/mtail_3.0.0-rc45_Linux_x86_64.tar.gz -O - | tar -xz -C /root/ChiaMonitor/
wget -O /etc/systemd/system/watch-farmer.service https://raw.githubusercontent.com/iwex/chiascripts/main/monitoring/watch-farmer.service
wget -O /etc/systemd/system/watch-farmer.timer https://raw.githubusercontent.com/iwex/chiascripts/main/monitoring/watch-farmer.timer
wget -O /etc/systemd/system/mtail.service https://raw.githubusercontent.com/iwex/chiascripts/main/monitoring/mtail.service
wget -O /root/watch-farmer.sh https://raw.githubusercontent.com/iwex/chiascripts/main/monitoring/watch-farmer.sh
chmod +x /root/watch-farmer.sh
systemctl daemon-reload
systemctl enable watch-farmer
systemctl enable watch-farmer.timer
systemctl enable mtail
systemctl start watch-farmer.timer
systemctl start mtail