Skip to content

Change default systemd restart policy #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions common/linux_systemd_config.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ struct SystemdRestartConfig
StartLimitBurst::Int
StartLimitIntervalSec::Int

# Give some reasonable defaults, such as trying to restart every second,
# but giving up if we try to restart 10 times within 2 minutes.
function SystemdRestartConfig(RestartSec::Int = 1,
StartLimitBurst::Int = 10,
StartLimitIntervalSec::Int = StartLimitBurst * (RestartSec + 10) + 10)
# Give some reasonable defaults, such as trying to restart every minute,
# but giving up if we try to restart 30 times within one hour.
function SystemdRestartConfig(RestartSec::Int = 60,
StartLimitBurst::Int = 30,
StartLimitIntervalSec::Int = StartLimitBurst * RestartSec * 2)
return new(RestartSec, StartLimitBurst, StartLimitIntervalSec)
end
end
Expand Down