]> git.pld-linux.org Git - packages/fcron.git/blobdiff - fcron.init
- up to 3.0.4 version
[packages/fcron.git] / fcron.init
index 85ad16046575feec8b9a8797323c6b3755b49655..33c7d503045d59ae136cbb7382800fc22eb8ef22 100644 (file)
@@ -4,14 +4,12 @@
 #
 # chkconfig:   2345 40 60
 #
-# description: cron is a standard UNIX program that runs user-specified \
-#              programs at periodic scheduled times. hc-cron adds a number \
-#              of features to the basic UNIX cron, including better security \
-#              and more powerful configuration options.
+# description: Fcron is a periodical command scheduler which aims at replacing \
+#              Vixie Cron, so it implements most of its functionalities.
 #
 # processname: crond
 # config:      /etc/fcron.conf
-# pidfile:     /var/run/fcron.pid
+# pidfile:     /var/run/crond.pid
 
 
 # Source function library
@@ -26,8 +24,15 @@ case "$1" in
   start)
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/crond ]; then
-               msg_starting fcron 
-               daemon /usr/sbin/fcron -b -c /etc/fcron.conf
+               msg_starting fcron
+               [ -f /var/spool/cron/systab.orig ] && rm -rf /var/spool/cron/systab.orig
+               FIND=`find /etc/cron.d/ \( -type f ! -name '*~' ! -name \*\.swp \
+                     ! -name \*\.rpmorig ! -name \*\.rpmnew ! -name \*\.rpmsave \)`
+                       for FILE in $FIND; do
+                               cat $FILE >>/var/spool/cron/systab.orig
+                       done
+               fcrontab -u systab -z > /dev/null 2>&1
+               daemon /usr/sbin/crond -b -c /etc/fcron.conf
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/crond
                else
@@ -38,15 +43,15 @@ case "$1" in
        # Stop daemons.
        if [ -f /var/lock/subsys/crond ]; then
                msg_stopping fcron
-               killproc fcron
+               killproc crond
                rm -f /var/lock/subsys/crond >/dev/null 2>&1
        else
                msg_not_running fcron
        fi
-                                                                                                                                       
+
        ;;
   status)
-       status fcron
+       status crond
        exit $?
        ;;
   restart|force-reload)
This page took 0.202132 seconds and 4 git commands to generate.