CVS: init.d fcron,NONE,1.1 metalog,NONE,1.1

Jasper Huysmans jasper at lunar-linux.org
Fri Oct 31 21:37:14 GMT 2003


Update of /var/cvs/lunar/init.d
In directory dbguin.lunar-linux.org:/tmp/cvs-serv3116

Added Files:
	fcron metalog 
Log Message:
Add fcron and metalog scripts for new init ssystem

--- NEW FILE: fcron ---
#! /bin/bash
#
# fcron          Start/Stop the fcron periodic scheduler.
#
# chkconfig: 2345 90 60
# description: cron is a standard UNIX program that runs user-specified \
#              programs at periodic scheduled times. fcron is an
#              implementation of cron especially designed for computers that
#              are not always on.
# processname: fcron
# config: /etc/fcrontab

# Source function library.
. /etc/init.d/functions

RETVAL=0

# See how we were called.
  
prog="fcron"

start() {
	echo -n $"Starting $prog: "
	daemon fcron
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/fcron
	return $RETVAL
}

stop() {
	echo -n $"Stopping $prog: "
	killproc fcron
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/fcron
	return $RETVAL
}	

rhstatus() {
	status fcron
}	

restart() {
  	stop
	start
}	

reload() {
	echo -n $"Reloading cron daemon configuration: "
	killproc fcron -HUP
	retval=$?
	echo
	return $RETVAL
}	

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart)
  	restart
	;;
  reload)
  	reload
	;;
  status)
  	rhstatus
	;;
  condrestart)
  	[ -f /var/lock/subsys/fcron ] && restart || :
	;;
  *)
	echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
	exit 1
esac

exit $?

--- NEW FILE: metalog ---
#!/bin/bash
#
# metalog        Starts metalog system logger.
#
#
# chkconfig: 2345 12 88
# description: Syslog is the facility by which many daemons use to log \
# messages to various system log files.  It is a good idea to always \
# run syslog. Metalog is an alternative implementation of the syslog service.

# Source function library.
. /etc/init.d/functions

[ -f /usr/sbin/metalog ] || exit 0

# Source config
if [ -f /etc/sysconfig/metalog ] ; then
	. /etc/sysconfig/metalog
else
	METALOG_OPTIONS="--daemonize --sync"
fi

RETVAL=0

umask 077

start() {
 	echo -n $"Starting system logger: "
	daemon metalog $METALOG_OPTIONS
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/metalog
	return $RETVAL
}	
stop() {
	echo -n $"Shutting down system logger: "
	killproc metalog
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/metalog
	return $RETVAL
}
restart() {
	stop
	start
}	

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  status)
  	status metalog
	;;
  restart|reload)
  	restart
	;;
  condrestart)
  	[ -f /var/lock/subsys/metalog ] && restart || :
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|condrestart}"
	exit 1
esac

exit $?





More information about the Lunar-commits mailing list