aboutsummaryrefslogblamecommitdiffstats
path: root/main/syslog-ng/syslog-ng.initd
blob: 38144142f8528aecb97679990b0bb2ff5398dafe (plain) (tree)
1
2
3
4
5
6
7
8
                  






                                                                  


                                


         
                                   
                                                                                                                              
               


        
                                   
                                                                     
               


          







                                                                                              
 
#!/sbin/openrc-run
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

extra_commands="update"
extra_started_commands="reload"

depend() {
	need hostname localmount
	before net
	provide logger
}

start() {
	ebegin "Starting syslog-ng"
	start-stop-daemon --start --quiet --pidfile /run/syslog-ng.pid --exec /usr/sbin/syslog-ng -- --process-mode background
	eend $?
}

stop() {
	ebegin "Stopping syslog-ng"
	start-stop-daemon --stop --quiet --pidfile /run/syslog-ng.pid
	eend $?
}

reload() {
	if [ ! -f /run/syslog-ng.pid ]
	then
		eerror "syslog-ng not running!"
		return 1
	fi
	ebegin "Reloading syslog-ng"
	start-stop-daemon --signal HUP --pidfile /run/syslog-ng.pid --exec /usr/sbin/syslog-ng
	eend $?
}