Merge pull request #1894 from filecoin-project/feat/chainwatch-usage
Add chainwatch systemd svc config
This commit is contained in:
commit
8638076ecb
11
Makefile
11
Makefile
@ -105,15 +105,17 @@ install:
|
||||
|
||||
install-services: install
|
||||
mkdir -p /usr/local/lib/systemd/system
|
||||
mkdir -p /var/log/lotus
|
||||
install -C -m 0644 ./scripts/lotus-daemon.service /usr/local/lib/systemd/system/lotus-daemon.service
|
||||
install -C -m 0644 ./scripts/lotus-miner.service /usr/local/lib/systemd/system/lotus-miner.service
|
||||
systemctl daemon-reload
|
||||
@echo
|
||||
@echo "lotus and lotus-miner services installed. Don't forget to 'systemctl enable lotus|lotus-miner' for it to be enabled on startup."
|
||||
@echo "lotus-daemon and lotus-miner services installed. Don't forget to 'systemctl enable lotus-daemon|lotus-miner' for it to be enabled on startup."
|
||||
|
||||
clean-services:
|
||||
rm -f /usr/local/lib/systemd/system/lotus-daemon.service
|
||||
rm -f /usr/local/lib/systemd/system/lotus-miner.service
|
||||
rm -f /usr/local/lib/systemd/system/chainwatch.service
|
||||
systemctl daemon-reload
|
||||
|
||||
# TOOLS
|
||||
@ -160,6 +162,13 @@ chainwatch:
|
||||
.PHONY: chainwatch
|
||||
BINS+=chainwatch
|
||||
|
||||
install-chainwatch-service: chainwatch
|
||||
install -C ./chainwatch /usr/local/bin/chainwatch
|
||||
install -C -m 0644 ./scripts/chainwatch.service /usr/local/lib/systemd/system/chainwatch.service
|
||||
systemctl daemon-reload
|
||||
@echo
|
||||
@echo "chainwatch installed. Don't forget to 'systemctl enable chainwatch' for it to be enabled on startup."
|
||||
|
||||
bench:
|
||||
rm -f bench
|
||||
go build -o bench ./cmd/lotus-bench
|
||||
|
15
scripts/chainwatch.service
Normal file
15
scripts/chainwatch.service
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Chainwatch
|
||||
After=lotus-daemon.service
|
||||
Requires=lotus-daemon.service
|
||||
|
||||
[Service]
|
||||
Environment=GOLOG_FILE="/var/log/lotus/chainwatch.log"
|
||||
Environment=GOLOG_LOG_FMT="json"
|
||||
Environment=LOTUS_DB=""
|
||||
Environment=LOTUS_PATH="%h/.lotus"
|
||||
EnvironmentFile=-/etc/lotus/chainwatch.env
|
||||
ExecStart=/usr/local/bin/chainwatch run
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,14 +1,14 @@
|
||||
[Unit]
|
||||
Description=Lotus Daemon
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
Requires=network-online.target
|
||||
|
||||
[Service]
|
||||
Environment=GOLOG_FILE="/var/log/lotus-daemon"
|
||||
Environment=GOLOG_FILE="/var/log/lotus/daemon.log"
|
||||
Environment=GOLOG_LOG_FMT="json"
|
||||
ExecStart=/usr/local/bin/lotus daemon
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
RestartSec=10
|
||||
|
||||
MemoryAccounting=true
|
||||
MemoryHigh=8G
|
||||
|
@ -2,10 +2,11 @@
|
||||
Description=Lotus Storage Miner
|
||||
After=network.target
|
||||
After=lotus-daemon.service
|
||||
Requires=lotus-daemon.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/lotus-storage-miner run
|
||||
Environment=GOLOG_FILE="/var/log/lotus-miner"
|
||||
Environment=GOLOG_FILE="/var/log/lotus/miner.log"
|
||||
Environment=GOLOG_LOG_FMT="json"
|
||||
|
||||
[Install]
|
||||
|
Loading…
Reference in New Issue
Block a user