File: cron.weekly

package info (click to toggle)
xntp3 5.93-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,644 kB
  • ctags: 7,419
  • sloc: ansic: 59,474; perl: 3,633; sh: 2,623; awk: 417; makefile: 311; asm: 37
file content (26 lines) | stat: -rw-r--r-- 463 bytes parent folder | download | duplicates (2)
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
#! /bin/sh
#
# cron script to rotate xntpd log file.
#

if [ -x /usr/sbin/xntpd ]
then

  case $(start-stop-daemon --test --stop --exec /usr/sbin/xntpd) in
    *Would\ send\ signal*)

	/etc/init.d/xntp3 stop

	if [ -f /var/log/xntpd ]; then
		savelog -g adm -m 644 -u root -c 4 /var/log/xntpd > /dev/null
	fi

	if [ -d /var/log/ntpstats ]; then
		find /var/log/ntpstats -type f -mtime +7 -exec rm {} \;
	fi

	/etc/init.d/xntp3 start > /dev/null

    ;;
  esac
fi