cronie: add the latest version 1.4.4
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
This commit is contained in:
parent
883b09fefe
commit
c398c16aa5
|
@ -0,0 +1,71 @@
|
|||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: crond crontab
|
||||
# Default-Start: 2345
|
||||
# Default-Stop: 016
|
||||
# Short-Description: run cron daemon
|
||||
# Description: cron is a standard UNIX program that runs user-specified
|
||||
# programs at periodic scheduled times. vixie cron adds a
|
||||
# number of features to the basic UNIX cron, including better
|
||||
# security and more powerful configuration options.
|
||||
### END INIT INFO
|
||||
|
||||
CROND=/usr/sbin/crond
|
||||
CONFIG=/etc/sysconfig/crond
|
||||
|
||||
[ -f $CONFIG ] || exit 1
|
||||
[ -x $CROND ] || exit 1
|
||||
|
||||
. $CONFIG
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
UID=`id -u`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ $UID -ne 0 ] ; then
|
||||
echo "User has insufficient privilege."
|
||||
exit 1
|
||||
fi
|
||||
echo -n "Starting crond: "
|
||||
start-stop-daemon --start --quiet --exec $CROND -- $CRONDARGS
|
||||
RETVAL=$?
|
||||
if [ $RETVAL -eq 0 ] ; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if [ $UID -ne 0 ] ; then
|
||||
echo "User has insufficient privilege."
|
||||
exit 1
|
||||
fi
|
||||
echo -n "Stopping crond: "
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid
|
||||
RETVAL=$?
|
||||
if [ $RETVAL -eq 0 ] ; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
if [ -n "`/bin/pidof $CROND`" ] ; then
|
||||
echo "crond is running."
|
||||
else
|
||||
echo "crond is not running."
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop && sleep 1 && $0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/crond {start|stop|status|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
|
||||
specified programs at scheduled times and related tools. It is based on the \
|
||||
original cron and has security and configuration enhancements like the \
|
||||
ability to use pam and SELinux."
|
||||
HOMEPAGE = "https://fedorahosted.org/cronie/"
|
||||
BUGTRACKER = "mmaslano@redhat.com"
|
||||
|
||||
# Internet Systems Consortium License
|
||||
LICENSE = "ISC license & BSD"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \
|
||||
file://src/cron.h;endline=20;md5=b425c334265026177128353a142633b4 \
|
||||
file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
|
||||
|
||||
SECTION = "utils"
|
||||
|
||||
PR = "r0"
|
||||
|
||||
SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
|
||||
file://crond.init"
|
||||
|
||||
inherit autotools update-rc.d
|
||||
|
||||
INITSCRIPT_NAME = "crond"
|
||||
INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
|
||||
|
||||
do_install_append () {
|
||||
install -d ${D}${sysconfdir}/sysconfig/
|
||||
install -d ${D}${sysconfdir}/init.d/
|
||||
install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
|
||||
install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
|
||||
}
|
Loading…
Reference in New Issue