fixup! systemd: Add prefix to unit script derivations
* Avoid extra string interpolation.
This commit is contained in:
parent
a9e9d37fc8
commit
daac85d991
@ -265,34 +265,28 @@ let
|
|||||||
environment.PATH = config.path;
|
environment.PATH = config.path;
|
||||||
}
|
}
|
||||||
(mkIf (config.preStart != "")
|
(mkIf (config.preStart != "")
|
||||||
{ serviceConfig.ExecStartPre = makeJobScript "${name}-pre-start" ''
|
{ serviceConfig.ExecStartPre =
|
||||||
${config.preStart}
|
makeJobScript "${name}-pre-start" config.preStart;
|
||||||
'';
|
|
||||||
})
|
})
|
||||||
(mkIf (config.script != "")
|
(mkIf (config.script != "")
|
||||||
{ serviceConfig.ExecStart = makeJobScript "${name}-start" ''
|
{ serviceConfig.ExecStart =
|
||||||
${config.script}
|
makeJobScript "${name}-start" config.script + " " + config.scriptArgs;
|
||||||
'' + " " + config.scriptArgs;
|
|
||||||
})
|
})
|
||||||
(mkIf (config.postStart != "")
|
(mkIf (config.postStart != "")
|
||||||
{ serviceConfig.ExecStartPost = makeJobScript "${name}-post-start" ''
|
{ serviceConfig.ExecStartPost =
|
||||||
${config.postStart}
|
makeJobScript "${name}-post-start" config.postStart;
|
||||||
'';
|
|
||||||
})
|
})
|
||||||
(mkIf (config.reload != "")
|
(mkIf (config.reload != "")
|
||||||
{ serviceConfig.ExecReload = makeJobScript "${name}-reload" ''
|
{ serviceConfig.ExecReload =
|
||||||
${config.reload}
|
makeJobScript "${name}-reload" config.reload;
|
||||||
'';
|
|
||||||
})
|
})
|
||||||
(mkIf (config.preStop != "")
|
(mkIf (config.preStop != "")
|
||||||
{ serviceConfig.ExecStop = makeJobScript "${name}-pre-stop" ''
|
{ serviceConfig.ExecStop =
|
||||||
${config.preStop}
|
makeJobScript "${name}-pre-stop" config.preStop;
|
||||||
'';
|
|
||||||
})
|
})
|
||||||
(mkIf (config.postStop != "")
|
(mkIf (config.postStop != "")
|
||||||
{ serviceConfig.ExecStopPost = makeJobScript "${name}-post-stop" ''
|
{ serviceConfig.ExecStopPost =
|
||||||
${config.postStop}
|
makeJobScript "${name}-post-stop" config.postStop;
|
||||||
'';
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user