Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 17859 Details for
Bug 28945
Add daemontools support to init script for syslog-ng
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for syslog-ng init script to support daemontools if installed
syslog-ng-patch (text/plain), 2.10 KB, created by
Mark Francis
on 2003-09-16 23:35:41 UTC
(
hide
)
Description:
Patch for syslog-ng init script to support daemontools if installed
Filename:
MIME Type:
Creator:
Mark Francis
Created:
2003-09-16 23:35:41 UTC
Size:
2.10 KB
patch
obsolete
>--- syslog-ng 2003-09-16 10:10:11.000000000 +1000 >+++ syslog-ng-new 2003-09-17 13:15:09.000000000 +1000 >@@ -5,6 +5,8 @@ > > opts="depend checkconfig start stop reload" > >+DAEMONTOOLSDIR="/var/daemontools/syslog-ng" >+ > depend() { > need clock hostname > provide logger >@@ -19,25 +21,51 @@ > } > > start() { >- checkconfig || return 1 >- ebegin "Starting syslog-ng" >- start-stop-daemon --start --quiet --exec /usr/sbin/syslog-ng >+ checkconfig || return 1 >+ if [ -x /usr/bin/svc ] && [ -x "${DAEMONTOOLSDIR}/run" ] \ >+ && [ ! -f "${DAEMONTOOLSDIR}/noinit" ] >+ then >+ ebegin "Starting supervised syslog-ng" >+ /usr/bin/pgrphack /usr/bin/supervise "$DAEMONTOOLSDIR" | \ >+ /usr/bin/pgrphack /usr/bin/supervise "$DAEMONTOOLSDIR"/log & >+ else >+ ebegin "Starting syslog-ng" >+ start-stop-daemon --start --quiet --exec /usr/sbin/syslog-ng >+ fi > eend $? "Failed to start syslog-ng" > } > > stop() { >- ebegin "Stopping syslog-ng" >- start-stop-daemon --stop --quiet --pidfile /var/run/syslog-ng.pid >- eend $? "Failed to stop syslog-ng" >- sleep 1 # needed for syslog-ng to stop in case we're restarting >+ ebegin "Stopping syslog-ng" >+ if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR" >+ then >+ /usr/bin/svc -dx "$DAEMONTOOLSDIR" "$DAEMONTOOLSDIR"/log >+ else >+ start-stop-daemon --stop --quiet --pidfile /var/run/syslog-ng.pid >+ fi >+ eend $? "Failed to stop syslog-ng" >+ sleep 1 # needed for syslog-ng to stop in case we're restarting > } > > reload() { >- if [ ! -f /var/run/syslog-ng.pid ]; then >- eerror "syslog-ng isn't running" >- return 1 >- fi > ebegin "Reloading configuration and re-opening log files" >- kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null >+ if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR" >+ then >+ /usr/bin/svc -h "$DAEMONTOOLSDIR" >+ else >+ if [ ! -f /var/run/syslog-ng.pid ]; then >+ eerror "syslog-ng isn't running" >+ return 1 >+ fi >+ kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null >+ fi > eend $? > } >+ >+status() { >+ if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR" >+ then >+ einfo `/usr/bin/svstat "$DAEMONTOOLSDIR"` >+ einfo `/usr/bin/svstat "${DAEMONTOOLSDIR}/log"` >+ fi >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28945
: 17859 |
17860
|
17861