Skip to content

Commit

Permalink
build: add auto-restart to systemd
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastCicada authored Dec 13, 2023
1 parent 3729ea9 commit ab25c41
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build-scripts/deb/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
[Unit]
Description=Core Registry CADT

# Stop automatically restarting if 10 failures in 5 minutes
StartLimitIntervalSec=300
StartLimitBurst=10

[Service]
# Set Chia directory as an environment variable
Environment=CHIA_ROOT=/home/%i/.chia/mainnet
Expand All @@ -27,5 +31,9 @@ ExecStart=/opt/core-registry-cadt/core-registry-cadt
User=%i
Group=%i

# Auto-restart if process stopped outside of systemd
Restart=on-failure
RestartSec=10s

[Install]
WantedBy=multi-user.target

0 comments on commit ab25c41

Please sign in to comment.