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/
main
Maximilian Bosch 2 years ago committed by Maximilian Bosch
parent 51770697cc
commit 6f9099fa62
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
  1. 2
      nixos/modules/services/web-apps/atlassian/confluence.nix
  2. 2
      nixos/modules/services/web-apps/atlassian/crowd.nix
  3. 2
      nixos/modules/services/web-apps/atlassian/jira.nix

@ -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…
Cancel
Save