summaryrefslogtreecommitdiff
path: root/templates/system/syslog/node.def
blob: 6bca34900336da25d4d6ca05e8380917948c7bb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
help: Configure syslog daemon
end: if [ -n "$VAR(./global/facility/@@)" ]; then
      # remove the default config for global messages
	sudo sh -c "sed -i '/\*\.notice;local7\.\*[[:space:]]*-\/var\/log\/messages/d' /etc/syslog.conf"
     else
      # if not already there then write the default config for global messages
      if ! grep -q "\*\.notice;local7\.\*[[:space:]]*-/var/log/messages" /etc/syslog.conf; then
	sudo sh -c "echo \"*.notice;local7.*	-/var/log/messages\" >> /etc/syslog.conf"
      fi
     fi
     sudo /usr/sbin/invoke-rc.d sysklogd restart