Gentoo Archives: gentoo-commits

From: "Michael Sterrett (mr_bones_)" <mr_bones_@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-admin/syslog-ng/files: syslog-ng.conf.gentoo.3 syslog-ng.conf.gentoo.fbsd.3 syslog-ng.rc6.3
Date: Tue, 06 Apr 2010 02:11:41
Message-Id: 20100406021135.7E4C62C04A@corvid.gentoo.org
1 mr_bones_ 10/04/06 02:11:35
2
3 Added: syslog-ng.conf.gentoo.3
4 syslog-ng.conf.gentoo.fbsd.3 syslog-ng.rc6.3
5 Log:
6 syslog-ng 3.x version bump; updated files/ to be generic for 3.x
7 (Portage version: 2.1.7.17/cvs/Linux i686)
8
9 Revision Changes Path
10 1.1 app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3?rev=1.1&content-type=text/plain
14
15 Index: syslog-ng.conf.gentoo.3
16 ===================================================================
17 @version: 3.0
18 # $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3,v 1.1 2010/04/06 02:11:35 mr_bones_ Exp $
19 #
20 # Syslog-ng default configuration file for Gentoo Linux
21
22 options {
23 chain_hostnames(no);
24
25 # The default action of syslog-ng is to log a STATS line
26 # to the file every 10 minutes. That's pretty ugly after a while.
27 # Change it to every 12 hours so you get a nice daily update of
28 # how many messages syslog-ng missed (0).
29 stats_freq(43200);
30 };
31
32 source src {
33 unix-stream("/dev/log" max-connections(256));
34 internal();
35 file("/proc/kmsg");
36 };
37
38 destination messages { file("/var/log/messages"); };
39
40 # By default messages are logged to tty12...
41 destination console_all { file("/dev/tty12"); };
42 # ...if you intend to use /dev/console for programs like xconsole
43 # you can comment out the destination line above that references /dev/tty12
44 # and uncomment the line below.
45 #destination console_all { file("/dev/console"); };
46
47 log { source(src); destination(messages); };
48 log { source(src); destination(console_all); };
49
50
51
52 1.1 app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3
53
54 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3?rev=1.1&view=markup
55 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3?rev=1.1&content-type=text/plain
56
57 Index: syslog-ng.conf.gentoo.fbsd.3
58 ===================================================================
59 @version: 3.0
60 # $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3,v 1.1 2010/04/06 02:11:35 mr_bones_ Exp $
61 #
62 # Syslog-ng default configuration file for Gentoo FreeBSD
63 #
64 options {
65 chain_hostnames(no);
66
67 # The default action of syslog-ng is to log a STATS line
68 # to the file every 10 minutes. That's pretty ugly after a while.
69 # Change it to every 12 hours so you get a nice daily update of
70 # how many messages syslog-ng missed (0).
71 stats_freq(43200);
72 };
73
74 source src {
75 unix-dgram("/var/run/log");
76 internal();
77 file("/dev/klog");
78 };
79
80 destination messages { file("/var/log/messages"); };
81
82 log { source(src); destination(messages); };
83
84
85
86 1.1 app-admin/syslog-ng/files/syslog-ng.rc6.3
87
88 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.rc6.3?rev=1.1&view=markup
89 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.rc6.3?rev=1.1&content-type=text/plain
90
91 Index: syslog-ng.rc6.3
92 ===================================================================
93 #!/sbin/runscript
94 # Copyright 1999-2004 Gentoo Foundation
95 # Distributed under the terms of the GNU General Public License v2
96 # $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.rc6.3,v 1.1 2010/04/06 02:11:35 mr_bones_ Exp $
97
98 opts="checkconfig reload"
99
100 depend() {
101 # Make networking dependency conditional on configuration
102 case $(sed 's/#.*//' /etc/syslog-ng/syslog-ng.conf) in
103 *source*tcp*|*source*udp*|*destination*tcp*|*destination*udp*)
104 need net
105 use stunnel ;;
106 esac
107
108 config /etc/syslog-ng/syslog-ng.conf
109 use clock
110 need hostname localmount
111 provide logger
112 }
113
114 checkconfig() {
115 if [ ! -e /etc/syslog-ng/syslog-ng.conf ] ; then
116 eerror "You need to create /etc/syslog-ng/syslog-ng.conf first."
117 eerror "An example can be found in /etc/syslog-ng/syslog-ng.conf.sample"
118 return 1
119 fi
120 syslog-ng -s -f /etc/syslog-ng/syslog-ng.conf
121
122 # the start and reload functions have their own eends so
123 # avoid calling this twice when there are no problems
124 [ $? -eq 0 ] || eend $? "Configuration error. Please fix your configfile (/etc/syslog-ng/syslog-ng.conf)"
125 }
126
127 start() {
128 checkconfig || return 1
129 ebegin "Starting syslog-ng"
130 [ -n "${SYSLOG_NG_OPTS}" ] && SYSLOG_NG_OPTS="-- ${SYSLOG_NG_OPTS}"
131 start-stop-daemon --start --pidfile /var/run/syslog-ng.pid --exec /usr/sbin/syslog-ng ${SYSLOG_NG_OPTS}
132 eend $? "Failed to start syslog-ng"
133 }
134
135 stop() {
136 ebegin "Stopping syslog-ng"
137 start-stop-daemon --stop --pidfile /var/run/syslog-ng.pid
138 eend $? "Failed to stop syslog-ng"
139 sleep 1 # needed for syslog-ng to stop in case we're restarting
140 }
141
142 reload() {
143 if [ ! -f /var/run/syslog-ng.pid ]; then
144 eerror "syslog-ng isn't running"
145 return 1
146 fi
147 checkconfig || return 1
148 ebegin "Reloading configuration and re-opening log files"
149 start-stop-daemon --stop --oknodo --signal HUP \
150 --pidfile /var/run/syslog-ng.pid
151 eend $?
152 }