Permalink
Browse files

Improve log cleanup

  • Loading branch information...
NEMS Linux
NEMS Linux committed Oct 26, 2018
1 parent 9776dbc commit 116fead3fe655f5860b353338280051a0ab00cca
Showing with 10 additions and 4 deletions.
  1. +10 −4 nems-cleanup.sh
@@ -154,10 +154,16 @@ nameserver 2001:4860:4860::8844
rm /var/www/htpasswd
# Reset NEMS Log Files
rm /var/log/nems/*
mkdir /var/log/nems
mkdir /var/log/nems/nems-tools
mkdir /var/log/nems/phoronix && chown -R www-data:www-data /var/log/nems/phoronix
find /var/log/nems/ -name "*" -type f -delete
if [[ ! -d /var/log/nems ]]; then
mkdir /var/log/nems
fi
if [[ ! -d /var/log/nems/nems-tools ]]; then
mkdir /var/log/nems/nems-tools
fi
if [[ ! -d /var/log/nems/phoronix ]]; then
mkdir /var/log/nems/phoronix && chown -R www-data:www-data /var/log/nems/phoronix
fi
# Reset Nagios Core User
cp -f /root/nems/nems-migrator/data/1.4/nagios/etc/cgi.cfg /usr/local/nagios/etc/

0 comments on commit 116fead

Please sign in to comment.