mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 16:34:45 +07:00
Follow-up to ec2900e: use restart_sec:SEC as canonical option name
A timeout is not the same as a restart delay, which this option really controls, but the name restart_delay is a bit too long. Hence, this obvious name so there's no ambiguity what unit we're dealing with. Keeping restarttmo:SEC as a compatibility setting for the benefit of the original authors, for now. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+3
-1
@@ -1203,8 +1203,10 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
|
||||
manual = 1;
|
||||
else if (!strncasecmp(cmd, "restart:", 8))
|
||||
restart_max = atoi(&cmd[8]);
|
||||
else if (!strncasecmp(cmd, "restarttmo:", 11))
|
||||
else if (!strncasecmp(cmd, "restarttmo:", 11)) /* compat alias */
|
||||
restart_tmo = atoi(&cmd[11]) * 1000;
|
||||
else if (!strncasecmp(cmd, "restart_sec:", 12))
|
||||
restart_tmo = atoi(&cmd[12]) * 1000;
|
||||
else if (!strncasecmp(cmd, "norestart", 9))
|
||||
restart_max = 0;
|
||||
else if (!strncasecmp(cmd, "oncrash:", 8)) {
|
||||
|
||||
Reference in New Issue
Block a user