install service files in suitable path; tweak lotus svc restarting
This commit is contained in:
parent
386b818d16
commit
4acf0c7ec0
11
Makefile
11
Makefile
@ -103,16 +103,17 @@ install:
|
|||||||
install -C ./lotus-storage-miner /usr/local/bin/lotus-storage-miner
|
install -C ./lotus-storage-miner /usr/local/bin/lotus-storage-miner
|
||||||
install -C ./lotus-seal-worker /usr/local/bin/lotus-seal-worker
|
install -C ./lotus-seal-worker /usr/local/bin/lotus-seal-worker
|
||||||
|
|
||||||
install-services:
|
install-services: install
|
||||||
install -C -m 0644 ./scripts/lotus-daemon.service /etc/systemd/system/lotus-daemon.service
|
mkdir -p /usr/local/lib/systemd/system
|
||||||
install -C -m 0644 ./scripts/lotus-miner.service /etc/systemd/system/lotus-miner.service
|
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
|
systemctl daemon-reload
|
||||||
@echo
|
@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 and lotus-miner services installed. Don't forget to 'systemctl enable lotus|lotus-miner' for it to be enabled on startup."
|
||||||
|
|
||||||
clean-services:
|
clean-services:
|
||||||
rm -f /etc/systemd/system/lotus-daemon.service
|
rm -f /usr/local/lib/systemd/system/lotus-daemon.service
|
||||||
rm -f /etc/systemd/system/lotus-miner.service
|
rm -f /usr/local/lib/systemd/system/lotus-miner.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
# TOOLS
|
# TOOLS
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Lotus Daemon
|
Description=Lotus Daemon
|
||||||
After=network.target
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/local/bin/lotus daemon
|
|
||||||
Environment=GOLOG_FILE="/var/log/lotus-daemon"
|
Environment=GOLOG_FILE="/var/log/lotus-daemon"
|
||||||
Environment=GOLOG_LOG_FMT="json"
|
Environment=GOLOG_LOG_FMT="json"
|
||||||
|
ExecStart=/usr/local/bin/lotus daemon
|
||||||
|
#ExecStop=/bin/sh -a -c /root/capture_lotus_heap.sh
|
||||||
|
Restart=always
|
||||||
|
RestartSec=30
|
||||||
|
|
||||||
MemoryAccounting=true
|
MemoryAccounting=true
|
||||||
MemoryHigh=8G
|
MemoryHigh=8G
|
||||||
MemoryMax=10G
|
MemoryMax=10G
|
||||||
|
Loading…
Reference in New Issue
Block a user