PHP 8.5.2
Preview: S01cron Size: 3.03 KB
//etc/rc3.d/S01cron

#!/bin/sh
# Start/stop the cron daemon.
#
### BEGIN INIT INFO
# Provides:          cron
# Required-Start:    $remote_fs $syslog $time
# Required-Stop:     $remote_fs $syslog $time
# Should-Start:      $network $named slapd autofs ypbind nscd nslcd winbind sssd
# Should-Stop:       $network $named slapd autofs ypbind nscd nslcd winbind sssd
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Regular background program processing 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

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DESC="cron daemon"
NAME=cron
DAEMON=/usr/sbin/cron
PIDFILE=/var/run/crond.pid
SCRIPTNAME=/etc/init.d/"$NAME"

test -f $DAEMON || exit 0

. /lib/lsb/init-functions

[ -r /etc/default/cron ] && . /etc/default/cron

# Read the system's locale and set cron's locale. This is only used for
# setting the charset of mails generated by cron. To provide locale
# information to tasks running under cron, see /etc/pam.d/cron.
#
# We read /etc/environment, but warn about locale information in
# there because it should be in /etc/default/locale.
parse_environment () 
{
    for ENV_FILE in /etc/environment /etc/default/locale; do
        [ -r "$ENV_FILE" ] || continue
        [ -s "$ENV_FILE" ] || continue

         for var in LANG LANGUAGE LC_ALL LC_CTYPE; do
             value=`egrep "^${var}=" "$ENV_FILE" | tail -n1 | cut -d= -f2`
             [ -n "$value" ] && eval export $var=$value

             if [ -n "$value" ] && [ "$ENV_FILE" = /etc/environment ]; then
                 log_warning_msg "/etc/environment has been deprecated for locale information; use /etc/default/locale for $var=$value instead"
             fi
         done
     done

# Get the timezone set.
    if [ -z "$TZ" -a -e /etc/localtime ]; then
        TZ=$(readlink /etc/localtime | sed "s|/usr/share/zoneinfo/||") 
    fi
}

# Parse the system's environment
if [ "$READ_ENV" = "yes" ] ; then
    parse_environment
fi


case "$1" in
start)	log_daemon_msg "Starting periodic command scheduler" "cron"
        start_daemon -p $PIDFILE $DAEMON -P $EXTRA_OPTS
        log_end_msg $?
	;;
stop)	log_daemon_msg "Stopping periodic command scheduler" "cron"
        killproc -p $PIDFILE $DAEMON
        RETVAL=$?
        [ $RETVAL -eq 0 ] && [ -e "$PIDFILE" ] && rm -f $PIDFILE
        log_end_msg $RETVAL
        ;;
restart) log_daemon_msg "Restarting periodic command scheduler" "cron" 
        $0 stop
        $0 start
        ;;
reload|force-reload) log_daemon_msg "Reloading configuration files for periodic command scheduler" "cron"
	# cron reloads automatically
        log_end_msg 0
        ;;
status)
        status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
        ;;
*)	log_action_msg "Usage: /etc/init.d/cron {start|stop|status|restart|reload|force-reload}"
        exit 2
        ;;
esac
exit 0

Directory Contents

Dirs: 0 × Files: 33

Name Size Perms Modified Actions
2.22 KB lrwxr-xr-x 2025-07-08 14:50:50
Edit Download
1.85 KB lrwxr-xr-x 2023-11-14 20:02:33
Edit Download
1.21 KB lrwxr-xr-x 2024-02-26 12:58:31
Edit Download
3.03 KB lrwxr-xr-x 2024-02-27 02:22:50
Edit Download
3.08 KB lrwxr-xr-x 2023-12-05 15:36:45
Edit Download
2.15 KB lrwxr-xr-x 2016-10-23 23:10:58
Edit Download
6.85 KB lrwxr-xr-x 2024-06-10 21:27:45
Edit Download
985 B lrwxr-xr-x 2025-03-17 11:36:12
Edit Download
3.40 KB lrwxr-xr-x 2024-04-01 06:55:32
Edit Download
6.27 KB lrwxr-xr-x 2025-12-04 10:46:13
Edit Download
4.47 KB lrwxr-xr-x 2025-04-28 07:08:08
Edit Download
1.80 KB lrwxr-xr-x 2025-09-05 13:01:22
Edit Download
4.19 KB lrwxr-xr-x 2025-07-22 07:08:08
Edit Download
4.19 KB lrwxr-xr-x 2025-07-22 07:08:08
Edit Download
4.19 KB lrwxr-xr-x 2025-07-22 07:08:08
Edit Download
4.19 KB lrwxr-xr-x 2025-07-22 07:08:08
Edit Download
4.19 KB lrwxr-xr-x 2025-07-22 07:08:08
Edit Download
4.19 KB lrwxr-xr-x 2025-12-30 07:08:08
Edit Download
4.19 KB lrwxr-xr-x 2025-12-30 07:08:08
Edit Download
4.19 KB lrwxr-xr-x 2026-01-22 07:08:08
Edit Download
4.19 KB lrwxr-xr-x 2026-01-22 07:08:08
Edit Download
4.19 KB lrwxr-xr-x 2026-01-22 07:08:08
Edit Download
1.35 KB lrwxr-xr-x 2024-03-21 13:42:02
Edit Download
3.02 KB lrwxr-xr-x 2024-03-05 15:20:59
Edit Download
5.20 KB lrwxr-xr-x 2024-05-09 07:08:08
Edit Download
3.04 KB lrwxr-xr-x 2025-07-30 19:03:47
Edit Download
1.57 KB lrwxr-xr-x 2024-01-09 13:42:30
Edit Download
4.31 KB lrwxr-xr-x 2024-04-12 17:09:41
Edit Download
3.96 KB lrwxr-xr-x 2025-07-21 15:58:50
Edit Download
1.54 KB lrwxr-xr-x 2024-01-09 20:31:44
Edit Download
1.36 KB lrwxr-xr-x 2024-02-12 17:50:35
Edit Download
1.28 KB lrwxr-xr-x 2024-04-09 14:02:37
Edit Download
4.46 KB lrwxr-xr-x 2023-11-25 12:25:37
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).