Skip to content

Commit 883d027

Browse files
committed
fix: move StartLimitIntervalSec and StartLimitBurst to [Unit] section
Fixes #541 systemd was logging warnings: Unknown key name 'StartLimitIntervalSec' in section 'Service' Unknown key name 'StartLimitBurst' in section 'Service' These keys belong in the [Unit] section, not [Service]. Moved them from common_hardening to header_common in the correct section. Verified with: - dune build (passes) - dune runtest (211 tests pass)
1 parent 94e78a6 commit 883d027

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
1010

1111
- Renamed "linked directories" to "registered directories" (CLI commands: `binaries link``binaries register`, `binaries unlink``binaries unregister`)
1212

13+
### Fixed
14+
15+
- Systemd service template warnings about unknown keys `StartLimitIntervalSec` and `StartLimitBurst` in [Service] section (moved to [Unit] section)
16+
1317
### Removed
1418

1519
- Ghostnet support - Ghostnet testnet has been deprecated and is no longer available as a network option

src/systemd.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ let unit_template ~user_mode ~role ~app_bin_dir ~user ?prestart () =
286286
"[Unit]\n\
287287
Description=Octez %s (%%i)\n\
288288
After=network-online.target\n\
289-
Wants=network-online.target\n\n\
289+
Wants=network-online.target\n\
290+
StartLimitBurst=10\n\
291+
StartLimitIntervalSec=300s\n\n\
290292
[Service]\n\
291293
Environment=APP_BIN_DIR=%s\n\
292294
Environment=ROLE=%s\n\
@@ -308,8 +310,6 @@ let unit_template ~user_mode ~role ~app_bin_dir ~user ?prestart () =
308310
let common_hardening =
309311
"Restart=on-failure\n\
310312
RestartSec=5s\n\
311-
StartLimitBurst=10\n\
312-
StartLimitIntervalSec=300s\n\
313313
NoNewPrivileges=yes\n\
314314
PrivateTmp=yes\n\
315315
ProtectSystem=strict\n\

0 commit comments

Comments
 (0)