Summary: A hard drive space monitor. Name: diskcheck Version: 1.6 Release: 3 Epoch: 2 License: GPL Group: Applications/System Source: diskcheck-%{version}.tar.gz Requires: crontabs, smtpdaemon Prereq: grep, sed BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildArch: noarch Requires: python2 %description DiskCheck is a small utility that monitors how much space is available on your hard drive. It checks your drive space every hour and takes action based on the specifications in a very simple config file. When disks are nearing full capacity, mail will be sent to the system administrator warning him to take action. %prep %setup -q %install rm -rf %{buildroot} mkdir -p %{buildroot}/etc/cron.hourly install -m 0755 diskcheck %{buildroot}/etc/cron.hourly/diskcheck install -m 0660 diskcheck.conf %{buildroot}/etc/diskcheck.conf %clean rm -rf %{buildroot} %post # upgrade on diskcheck config file format if grep -q "\$DefaultCutoff" /etc/diskcheck.conf || \ grep -q "cutoff{" /etc/diskcheck.conf; then sed -e 's|^\(#\?\)\$|\1|' \ -e 's|;$||' \ -e 's|DefaultCutoff|defaultCutoff|' \ -e 's|Cutoff{\(.*\)}|cutoff\[\1\]|' \ -e 's|cutoff{\(.*\)}|cutoff\[\1\]|' \ -e 's|mailfrom|mailFrom|' \ -e 's|mailto|mailTo|' \ -e 's|mailprog|mailProg|' \ -e 's|diskcheck.pl|diskcheck|' \ -e 's|^# Location and name.*||' \ -e 's|^tempfile = .*||' /etc/diskcheck.conf > \ /etc/diskcheck.conf.new cat /etc/diskcheck.conf.new > /etc/diskcheck.conf rm -f /etc/diskcheck.conf.new fi %files %defattr(-,root,root) %config(noreplace) /etc/diskcheck.conf /etc/cron.hourly/diskcheck %changelog * Thu Apr 02 2020 ifas ifas 2:1.6-3 - modify script to require /usr/bin/python2 - rebuilt for EL8 * Wed Sep 21 2004 Harald Hoyer - 2:1.6-2 - rebuilt * Wed Feb 18 2004 Harald Hoyer - 2:1.6-1 - fixed traceback for non-df filesystems like ntfs (115861) * Fri Dec 5 2003 Harald Hoyer 2:1.5-1 - added inode checking, thx to Karl DeBisschop #109972 - exclude udf filesystems from check #111485 * Tue Sep 30 2003 Harald Hoyer 2:1.4-5 - fixed mailFrom to correct email address * Wed Jun 4 2003 Harald Hoyer 2:1.4-4 - added hostname in subject #92259 * Fri May 23 2003 Harald Hoyer 2:1.4-3 - fixed #91504 * Tue Jan 04 2003 Harald Hoyer 1.4-2 - rebuilt * Tue Nov 5 2002 Harald Hoyer 1.4-1 - typecast strings to long on comparisons #73335 * Thu May 30 2002 Harald Hoyer - removed regsub and regex * Tue Apr 02 2002 Harald Hoyer 1.2-1 - fixed #58571 * Wed Nov 7 2001 Preston Brown - fixed bugs (#54578, 55069) - fix potential issue in upgrade post-script * Wed Jun 6 2001 Preston Brown - new program, idea from perl script of the same name