nixos/{jira,crowd,confluence}: restart service on failure
In case of unexpected failures of the services - such as an OOM - it shouldn't be necessary for an administrator to restart the service by hand (which is usually sufficient). Instead, this should happen automatically. Also, I decided to increase the interval between restart attempts from 100ms[1] to 10s for a small grace period as suggested by several online resources[2][3]. [1] See `systemd.service(5)` [2] https://it.megocollector.com/linux/create-systemd-services-for-atlassian-apps/ [3] https://anteru.net/blog/2017/jira-confluence-with-systemd-on-centos/
This commit is contained in:
parent
51770697cc
commit
6f9099fa62
|
@ -189,6 +189,8 @@ in
|
|||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
PrivateTmp = true;
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10";
|
||||
ExecStart = "${pkg}/bin/start-confluence.sh -fg";
|
||||
ExecStop = "${pkg}/bin/stop-confluence.sh";
|
||||
};
|
||||
|
|
|
@ -157,6 +157,8 @@ in
|
|||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
PrivateTmp = true;
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10";
|
||||
ExecStart = "${pkg}/start_crowd.sh -fg";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -197,6 +197,8 @@ in
|
|||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
PrivateTmp = true;
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10";
|
||||
ExecStart = "${pkg}/bin/start-jira.sh -fg";
|
||||
ExecStop = "${pkg}/bin/stop-jira.sh";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue