mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-10-31 16:31:40 +01:00 
			
		
		
		
	A small syslogd for logging to multiple files http://www.gnu.org/software/inetutils/ revised complete patch for inetutils-syslogd. post-install - just gives status / info message - configuration is now done by /sbin/setup-inetutils-syslogd. Both scripts now use the system colours $STRONG $RED $GREEN. post-deinstall - just adds back busybox syslog to boot runlevel & shows the status of syslog & cron (as cron will be stopped by removing any syslog)
		
			
				
	
	
		
			51 lines
		
	
	
		
			1008 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1008 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #!/sbin/runscript
 | |
| 
 | |
| # This file is part of inetutils-syslogd
 | |
| # Created for Alpine Linux by IT Offshore <developer@it-offshore.co.uk>
 | |
| 
 | |
| name=syslogd
 | |
| daemon=/usr/sbin/$name
 | |
| config_file="/etc/syslog.conf"
 | |
| 
 | |
| depend() {
 | |
| 	need clock hostname localmount
 | |
|         provide logger
 | |
| }
 | |
| 
 | |
| check_config() {
 | |
|         [ -f "$config_file" ] || error "$config_file is missing"
 | |
| }
 | |
| 
 | |
| start_pre() {
 | |
|         check_config || return 1
 | |
| }
 | |
| 
 | |
| start() {
 | |
| 	ebegin "Starting ${name}"
 | |
| 		start-stop-daemon --start --quiet \
 | |
| 			--pidfile /var/run/${name}.pid \
 | |
| 			--exec ${daemon} -- ${SYSLOGD_OPTS}
 | |
| 	eend $?
 | |
| }
 | |
| 
 | |
| stop() {
 | |
| 	ebegin "Stopping ${name}"
 | |
| 		start-stop-daemon --stop --quiet \
 | |
| 			--pidfile /var/run/$name.pid \
 | |
| 			--exec ${daemon}
 | |
| 	eend $?
 | |
| }
 | |
| 
 | |
| reload() {
 | |
|         if [ ! -f "${PIDFILE}" ]; then
 | |
|                 eerror "rsyslogd not running"
 | |
|                 return 1
 | |
|         fi
 | |
| 
 | |
|         ebegin "Re-opening intetutils-syslogd log files"
 | |
|         start-stop-daemon --stop --signal HUP \
 | |
|                 --pidfile /var/run/$name.pid
 | |
|         eend $?
 | |
| }
 | |
| 
 |