2006-12-10 23:43:04 +01:00
|
|
|
{runCommand}: job:
|
2006-11-19 22:03:22 +01:00
|
|
|
|
2007-03-06 01:07:00 +01:00
|
|
|
(
|
2007-06-08 17:41:12 +02:00
|
|
|
if job ? jobDrv then
|
|
|
|
job.jobDrv
|
|
|
|
else
|
|
|
|
(
|
2007-11-12 17:43:35 +01:00
|
|
|
runCommand ("upstart-" + job.name)
|
|
|
|
{ inherit (job) job;
|
|
|
|
jobName = job.name;
|
|
|
|
buildHook = if job ? buildHook then job.buildHook else "true";
|
|
|
|
}
|
|
|
|
"eval \"$buildHook\"; ensureDir $out/etc/event.d; echo \"$job\" > $out/etc/event.d/$jobName"
|
2007-06-08 17:41:12 +02:00
|
|
|
)
|
2007-03-06 01:07:00 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
{
|
2007-06-08 17:41:12 +02:00
|
|
|
# Allow jobs to declare extra packages that should be added to the
|
|
|
|
# system path.
|
2007-03-06 01:07:00 +01:00
|
|
|
extraPath = if job ? extraPath then job.extraPath else [];
|
2007-06-08 17:41:12 +02:00
|
|
|
|
|
|
|
# Allow jobs to declare extra files that should be added to /etc.
|
2007-03-30 14:55:09 +02:00
|
|
|
extraEtc = if job ? extraEtc then job.extraEtc else [];
|
2007-06-08 17:41:12 +02:00
|
|
|
|
2007-11-23 11:56:12 +01:00
|
|
|
# Allow jobs to declare extra configuration for Apache (e.g. Nagios
|
|
|
|
# declaring its web interface).
|
|
|
|
extraHttpdConfig = if job ? extraHttpdConfig then job.extraHttpdConfig else "";
|
|
|
|
|
2007-06-08 17:41:12 +02:00
|
|
|
# Allow jobs to declare user accounts that should be created.
|
|
|
|
users = if job ? users then job.users else [];
|
2007-06-10 22:13:12 +02:00
|
|
|
|
|
|
|
# Allow jobs to declare groups that should be created.
|
|
|
|
groups = if job ? groups then job.groups else [];
|
2008-07-02 20:02:24 +02:00
|
|
|
|
|
|
|
passthru = if job ? passthru then job.passthru else {};
|
2007-03-30 14:55:09 +02:00
|
|
|
}
|