File: cron.daily

package info (click to toggle)
netkit-base 0.10-10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,492 kB
  • ctags: 1,349
  • sloc: ansic: 9,958; sh: 216; makefile: 129
file content (23 lines) | stat: -rw-r--r-- 495 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
#!/bin/sh
# /etc/cron.daily/netkit-inetd: netkit-inetd daily maintenance script
# Written by Peter Tobias <tobias@linux.de>

bak=/var/backups

umask 022
if cd $bak
then
  if [ -s /etc/inetd.conf ]; then
    if [ -s inetd.conf.bak ]; then
      if ! cmp -s inetd.conf.bak /etc/inetd.conf; then
	if [ -s inetd.conf.bak ]; then
	  savelog -m 644 inetd.conf.bak >/dev/null
	fi
        cp -p /etc/inetd.conf inetd.conf.bak
      fi
    else
      cp -p /etc/inetd.conf inetd.conf.bak
    fi
  fi
fi