File: init.d

package info (click to toggle)
anacron 2.0.1-2
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 188 kB
  • ctags: 161
  • sloc: ansic: 1,091; makefile: 98; sh: 53
file content (29 lines) | stat: -rw-r--r-- 512 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/sh
# /etc/init.d/anacron: start anacron
#
# Written by Christian Schwarz <schwarz@debian.org>

PATH=/bin:/usr/bin:/sbin:/usr/sbin

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

case "$1" in
  start)
    # Run anacron only if it's later than 7:30am.
    if test `date +%H%M` -lt 730; then
	exit 0
    fi
    echo -n "Starting anac(h)ronistic cron: anacron"
    anacron -s
    echo "."
    ;;
  restart|force-reload|stop)
    :
    ;;
  *)
    echo "Usage: /etc/init.d/anacron start"
    exit 1
    ;;
esac

exit 0