Aktuelles
Digital Eliteboard - Das Digitale Technik Forum

Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben

Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben

Original Inhalt der Datei /etc/init.d/cron

    Nobody is reading this thread right now.
Registriert
7. Februar 2008
Beiträge
2.975
Reaktionspunkte
2.416
Punkte
373
Ort
Überall und Nirgendwo
Hallo,

vor lauter probieren und testen und rumspielen habe ich ausversehen den Inhalt der Datei /etc/init.d/cron gelöscht.

Kann mir den Bitte jemand zur verfügung stellen?

Ich habe Debian Lenny am laufen.
 
Zuletzt bearbeitet:
AW: Original Inhalt der Datei /etc/init.d/cron

Unter /etc/init.d/cron habe ich auf die Datei kein Zugriff, lässt sich bei mir (Debian 5.0.4) weder kopieren noch öffnen, oder meinst du crontab?
 
AW: Original Inhalt der Datei /etc/init.d/cron

ne schon die datei cron

wenn ich mich per root einlogge und dann mit winscp drauf gehe habe ich zugrif auf die datei
 
AW: Original Inhalt der Datei /etc/init.d/cron

Das ja mal schlecht,
besonders weil du uns dein system nicht mitgeteilt hast.

Ubuntu 9.10
Code:
#!/bin/sh -e
# upstart-job
#
# Symlink target for initscripts that have been converted to Upstart.

set -e

INITSCRIPT="$(basename "$0")"
JOB="${INITSCRIPT%.sh}"

if [ "$JOB" = "upstart-job" ]; then
    if [ -z "$1" ]; then
        echo "Usage: upstart-job JOB COMMAND" 1>&2
    exit 1
    fi

    JOB="$1"
    INITSCRIPT="$1"
    shift
else
    if [ -z "$1" ]; then
        echo "Usage: $0 COMMAND" 1>&2
    exit 1
    fi
fi

COMMAND="$1"
shift


if [ -z "$DPKG_MAINTSCRIPT_PACKAGE" ]; then
    ECHO=echo
else
    ECHO=:
fi

$ECHO "Rather than invoking init scripts through /etc/init.d, use the service(8)"
$ECHO "utility, e.g. service $INITSCRIPT $COMMAND"

case $COMMAND in
status)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"
    $COMMAND "$JOB"
    ;;
start|stop|restart)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"
    PID=$(status "$JOB" 2>/dev/null | awk '/[0-9]$/ { print $NF }')
    if [ -z "$PID" ] && [ "$COMMAND" = "stop" ]; then
        exit 0
    elif [ -n "$PID" ] && [ "$COMMAND" = "start" ]; then
        exit 0
    elif [ -z "$PID" ] && [ "$COMMAND" = "restart" ]; then
        start "$JOB"
        exit 0
    fi
    $COMMAND "$JOB"
    ;;
reload|force-reload)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"
    reload "$JOB"
    ;;
*)
    $ECHO
    $ECHO "The script you are attempting to invoke has been converted to an Upstart" 1>&2
    $ECHO "job, but $COMMAND is not supported for Upstart jobs." 1>&2
    exit 1
esac
debian 5.0.4
Code:
#!/bin/sh
# Start/stop the cron daemon.
#
### BEGIN INIT INFO
# Provides:          cron
# Required-Start:    $remote_fs $syslog $time
# Required-Stop:     $remote_fs $syslog $time
# Default-Start:     2 3 4 5
# Default-Stop:      1
# 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


test -f /usr/sbin/cron || exit 0

PIDFILE=/var/run/crond.pid
# In some systems the pidfile might be (incorrectly) set to /etc
# if this pidfile is present, use it instead.
[ -e /etc/cron.pid ] && PIDFILE=/etc/crond.pid
[ -r /etc/default/cron ] && . /etc/default/cron

. /lib/lsb/init-functions

# Read the system's locale and set cron's locale. This locale
# will be inherited by cron (used to set charset of emails)
# and tasks running under it.

parse_environment () 
{
    ENV_FILE="none"
    [ -r /etc/environment ] && ENV_FILE="/etc/environment"
    [ -r /etc/default/locale ] && ENV_FILE="/etc/default/locale"
    [ $ENV_FILE = none ] && return

    for var in LANG LC_ALL LC_CTYPE; do
        value=$(egrep "^[^#]*${var}=" $ENV_FILE | tail -n1 | cut -d= -f2)
        eval $var=$value
    done
}

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


case "$1" in
start)    log_daemon_msg "Starting periodic command scheduler" "crond"
        start-stop-daemon --start --quiet --pidfile $PIDFILE --name cron --startas /usr/sbin/cron -- $LSBNAMES $EXTRA_OPTS
        log_end_msg $?
    ;;
stop)    log_daemon_msg "Stopping periodic command scheduler" "crond"
        start-stop-daemon --stop --quiet --pidfile $PIDFILE --name cron
        log_end_msg $?
        ;;
restart) log_daemon_msg "Restarting periodic command scheduler" "crond" 
        start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE --name cron
        start-stop-daemon --start --quiet --pidfile $PIDFILE --name cron --startas /usr/sbin/cron -- $LSBNAMES $EXTRA_OPTS
        log_end_msg $?
        ;;
reload|force-reload) log_daemon_msg "Reloading configuration files for periodic command scheduler" "crond"
    # cron reloads automatically
        log_end_msg 0
        ;;
*)    log_action_msg "Usage: /etc/init.d/cron {start|stop|restart|reload|force-reload}"
        exit 2
        ;;
esac
exit 0


du siehst den unterschied
 
Zurück
Oben