Adjust service logging and startup settings

This commit is contained in:
Mike Greenberg 2020-06-04 08:09:01 -04:00
parent 21415a9847
commit c0cdcbb9e0
4 changed files with 11 additions and 6 deletions

View File

@ -105,11 +105,12 @@ install:
install-services: install install-services: install
mkdir -p /usr/local/lib/systemd/system 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-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 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-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: clean-services:
rm -f /usr/local/lib/systemd/system/lotus-daemon.service rm -f /usr/local/lib/systemd/system/lotus-daemon.service

View File

@ -1,12 +1,15 @@
[Unit] [Unit]
Description=Chainwatch Description=Chainwatch
PartOf=sentinel.service
After=lotus-daemon.service After=lotus-daemon.service
Requires=lotus-daemon.service Requires=lotus-daemon.service
[Service] [Service]
ExecStart=/usr/local/bin/chainwatch run Environment=GOLOG_FILE="/var/log/lotus/chainwatch.log"
Environment=GOLOG_LOG_FMT="json"
Environment=LOTUS_DB="postgres://postgres:password@localhost:5432/postgres?sslmode=disable" Environment=LOTUS_DB="postgres://postgres:password@localhost:5432/postgres?sslmode=disable"
Environment=LOTUS_PATH="/root/.lotus" Environment=LOTUS_PATH="/root/.lotus"
ExecStart=/usr/local/bin/chainwatch run
[Install] [Install]
WantedBy=multiuser.target WantedBy=multiuser.target

View File

@ -1,15 +1,15 @@
[Unit] [Unit]
Description=Lotus Daemon Description=Lotus Daemon
After=network-online.target After=network-online.target
Wants=network-online.target Requires=network-online.target
[Service] [Service]
Environment=GOLOG_FILE="/var/log/lotus-daemon" Environment=GOLOG_FILE="/var/log/lotus/daemon.log"
Environment=GOLOG_LOG_FMT="json" Environment=GOLOG_LOG_FMT="json"
ExecStart=/usr/local/bin/lotus daemon ExecStart=/usr/local/bin/lotus daemon
#ExecStop=/bin/sh -a -c /root/capture_lotus_heap.sh #ExecStop=/bin/sh -a -c /root/capture_lotus_heap.sh
Restart=always Restart=always
RestartSec=30 RestartSec=10
MemoryAccounting=true MemoryAccounting=true
MemoryHigh=8G MemoryHigh=8G

View File

@ -2,10 +2,11 @@
Description=Lotus Storage Miner Description=Lotus Storage Miner
After=network.target After=network.target
After=lotus-daemon.service After=lotus-daemon.service
Requires=lotus-daemon.service
[Service] [Service]
ExecStart=/usr/local/bin/lotus-storage-miner run 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" Environment=GOLOG_LOG_FMT="json"
[Install] [Install]