Fix atlassian services (optional attr. and systemd)
- Properly handle optional configuration. - Use ExecStart/ExecStop instead of script/stopScript.
This commit is contained in:
parent
c0db9bb9fe
commit
3c06d9f0b0
|
@ -178,14 +178,13 @@ in
|
|||
${pkg}/conf/server.xml.dist > ${cfg.home}/server.xml
|
||||
'';
|
||||
|
||||
script = "${pkg}/bin/start-confluence.sh -fg";
|
||||
stopScript = "${pkg}/bin/stop-confluence.sh";
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
PrivateTmp = true;
|
||||
PermissionsStartOnly = true;
|
||||
ExecStart = "${pkg}/bin/start-confluence.sh -fg";
|
||||
ExecStop = "${pkg}/bin/stop-confluence.sh";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -9,9 +9,10 @@ let
|
|||
pkg = pkgs.atlassian-crowd.override {
|
||||
home = cfg.home;
|
||||
port = cfg.listenPort;
|
||||
proxyUrl = "${cfg.proxy.scheme}://${cfg.proxy.name}:${toString cfg.proxy.port}";
|
||||
openidPassword = cfg.openidPassword;
|
||||
};
|
||||
} // (optionalAttrs cfg.proxy.enable {
|
||||
proxyUrl = "${cfg.proxy.scheme}://${cfg.proxy.name}:${toString cfg.proxy.port}";
|
||||
});
|
||||
|
||||
in
|
||||
|
||||
|
@ -142,13 +143,12 @@ in
|
|||
${pkg}/apache-tomcat/conf/server.xml.dist > ${cfg.home}/server.xml
|
||||
'';
|
||||
|
||||
script = "${pkg}/start_crowd.sh -fg";
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
PrivateTmp = true;
|
||||
PermissionsStartOnly = true;
|
||||
ExecStart = "${pkg}/start_crowd.sh -fg";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@ let
|
|||
|
||||
cfg = config.services.jira;
|
||||
|
||||
pkg = pkgs.atlassian-jira.override {
|
||||
pkg = pkgs.atlassian-jira.override (optionalAttrs cfg.sso.enable {
|
||||
enableSSO = cfg.sso.enable;
|
||||
crowdProperties = ''
|
||||
application.name ${cfg.sso.applicationName}
|
||||
|
@ -21,7 +21,7 @@ let
|
|||
session.validationinterval ${toString cfg.sso.validationInterval}
|
||||
session.lastvalidation session.lastvalidation
|
||||
'';
|
||||
};
|
||||
});
|
||||
|
||||
in
|
||||
|
||||
|
@ -183,14 +183,13 @@ in
|
|||
${pkg}/conf/server.xml.dist > ${cfg.home}/server.xml
|
||||
'';
|
||||
|
||||
script = "${pkg}/bin/start-jira.sh -fg";
|
||||
stopScript = "${pkg}/bin/stop-jira.sh";
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
PrivateTmp = true;
|
||||
PermissionsStartOnly = true;
|
||||
ExecStart = "${pkg}/bin/start-jira.sh -fg";
|
||||
ExecStop = "${pkg}/bin/stop-jira.sh";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue