nixpkgs/upstart-jobs/syslogd.nix
Eelco Dolstra 6f64c4ee0d * syslogd: print messages in the local time zone.
* dhcpd: log to facility "local1".
* syslogd: send "local1" messages to /var/log/dhcpd, and "mail" 
  messages to /var/log/mail.

svn path=/nixos/trunk/; revision=11780
2008-05-08 12:27:01 +00:00

32 lines
605 B
Nix

{sysklogd, writeText, config}:
let
syslogConf = writeText "syslog.conf" ''
*.* /dev/tty10
# "local1" is used for dhcpd messages.
local1.* -/var/log/dhcpd
mail.* -/var/log/mail
*.=warning;*.=err -/var/log/warn
*.crit /var/log/warn
*.*;mail.none;local1.none -/var/log/messages
'';
in
{
name = "syslogd";
job = ''
start on udev
stop on shutdown
env TZ=${config.time.timeZone}
respawn ${sysklogd}/sbin/syslogd -n -f ${syslogConf}
'';
}