2008-05-08 05:27:01 -07:00
|
|
|
{sysklogd, writeText, config}:
|
2008-04-01 05:50:47 -07:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
syslogConf = writeText "syslog.conf" ''
|
2008-05-08 05:27:01 -07:00
|
|
|
*.* /dev/tty10
|
2008-04-01 05:50:47 -07:00
|
|
|
|
2008-05-08 05:27:01 -07:00
|
|
|
# "local1" is used for dhcpd messages.
|
|
|
|
local1.* -/var/log/dhcpd
|
2008-04-01 05:50:47 -07:00
|
|
|
|
2008-05-08 05:27:01 -07:00
|
|
|
mail.* -/var/log/mail
|
2008-04-01 05:50:47 -07:00
|
|
|
|
2008-05-08 05:27:01 -07:00
|
|
|
*.=warning;*.=err -/var/log/warn
|
|
|
|
*.crit /var/log/warn
|
|
|
|
|
|
|
|
*.*;mail.none;local1.none -/var/log/messages
|
2008-04-01 05:50:47 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
in
|
2006-11-19 12:07:45 -08:00
|
|
|
|
2006-11-19 13:03:22 -08:00
|
|
|
{
|
2006-11-19 12:07:45 -08:00
|
|
|
name = "syslogd";
|
2008-05-08 05:27:01 -07:00
|
|
|
job = ''
|
2006-12-13 04:17:38 -08:00
|
|
|
start on udev
|
2006-11-19 13:03:22 -08:00
|
|
|
stop on shutdown
|
2008-05-08 05:27:01 -07:00
|
|
|
|
|
|
|
env TZ=${config.time.timeZone}
|
|
|
|
|
2008-04-01 05:50:47 -07:00
|
|
|
respawn ${sysklogd}/sbin/syslogd -n -f ${syslogConf}
|
2008-05-08 05:27:01 -07:00
|
|
|
'';
|
2006-11-19 12:07:45 -08:00
|
|
|
}
|