view common/0logwatch @ 260:5f63afb70415

Fix naming of files for new VPS overrides $hostname is just the short host name, not the FQDN
author IBBoard <dev@ibboard.co.uk>
date Sun, 29 Dec 2019 10:57:18 -0500
parents 956e484adc12
children
line wrap: on
line source

#!/bin/bash

DailyReport=`grep -e "^[[:space:]]*DailyReport[[:space:]]*=[[:space:]]*" /usr/share/logwatch/default.conf/logwatch.conf | head -n1 | sed -e "s|^\s*DailyReport\s*=\s*||"`

if [ "$DailyReport" != "No" ] && [ "$DailyReport" != "no" ]
then
    logwatch
fi