add chainwatch systemd svc config; make install-chainwatch-service
This commit is contained in:
parent
4acf0c7ec0
commit
21415a9847
8
Makefile
8
Makefile
@ -114,6 +114,7 @@ install-services: install
|
||||
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 +161,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
|
||||
|
12
scripts/chainwatch.service
Normal file
12
scripts/chainwatch.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Chainwatch
|
||||
After=lotus-daemon.service
|
||||
Requires=lotus-daemon.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/chainwatch run
|
||||
Environment=LOTUS_DB="postgres://postgres:password@localhost:5432/postgres?sslmode=disable"
|
||||
Environment=LOTUS_PATH="/root/.lotus"
|
||||
|
||||
[Install]
|
||||
WantedBy=multiuser.target
|
Loading…
Reference in New Issue
Block a user