Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 17784 Details for
Bug 28294
New USE flag 'daemontools' as an alternative to init.d
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Example of init service
syslog-ng-new (text/plain), 1.90 KB, created by
Mark Francis
on 2003-09-15 17:34:33 UTC
(
hide
)
Description:
Example of init service
Filename:
MIME Type:
Creator:
Mark Francis
Created:
2003-09-15 17:34:33 UTC
Size:
1.90 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2003 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License, v2 or later ># $Header: /home/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.rc6,v 1.10 2003/02/28 04:25:10 agriffis Exp $ > >opts="depend checkconfig start stop reload" > >DAEMONTOOLSDIR="/var/daemontools/syslog-ng" > >depend() { > need clock hostname > provide logger >} > >checkconfig() { > if [ ! -e /etc/syslog-ng/syslog-ng.conf ] ; then > eerror "You need to create /etc/syslog-ng/syslog-ng.conf first." > eerror "An example can be found in /etc/syslog-ng/syslog-ng.conf.sample" > return 1 > fi >} > >start() { > 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" > 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() { > ebegin "Reloading configuration and re-opening log files" > 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 Raw
Actions:
View
Attachments on
bug 28294
:
17368
| 17784 |
20770