core: add RestartSteps= and RestartSecMax= for exponentially increasing
interval between restarts RestartSteps= accepts a positive integer as the number of steps to take to increase the interval between auto-restarts from RestartSec= to RestartSecMax=, or 0 to disable it. Closes #6129
This commit is contained in:
@@ -116,6 +116,8 @@ struct Service {
|
||||
char *pid_file;
|
||||
|
||||
usec_t restart_usec;
|
||||
unsigned restart_steps;
|
||||
usec_t restart_usec_max;
|
||||
usec_t timeout_start_usec;
|
||||
usec_t timeout_stop_usec;
|
||||
usec_t timeout_abort_usec;
|
||||
@@ -245,6 +247,8 @@ extern const UnitVTable service_vtable;
|
||||
int service_set_socket_fd(Service *s, int fd, struct Socket *socket, struct SocketPeer *peer, bool selinux_context_net);
|
||||
void service_close_socket_fd(Service *s);
|
||||
|
||||
usec_t service_restart_usec(Service *s);
|
||||
|
||||
const char* service_restart_to_string(ServiceRestart i) _const_;
|
||||
ServiceRestart service_restart_from_string(const char *s) _pure_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user