diff --git a/build-scripts/deb/climate-tokenization-engine@.service b/build-scripts/deb/climate-tokenization-engine@.service index 11f1089..8c5f78f 100644 --- a/build-scripts/deb/climate-tokenization-engine@.service +++ b/build-scripts/deb/climate-tokenization-engine@.service @@ -19,6 +19,10 @@ [Unit] Description=Climate Tokenization Engine +# 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 @@ -30,5 +34,9 @@ ExecStart=/opt/climate-tokenization-engine/climate-tokenization-engine User=%i Group=%i +# Auto-restart if process stopped outside of systemd +Restart=on-failure +RestartSec=10s + [Install] WantedBy=multi-user.target