Browse Source

Silence errors when logrotate is not installed

Co-authored-by: emwe1 <emwe1@users.noreply.github.com>
pull/117/head
Samuel FORESTIER 4 years ago
parent
commit
0fdf8827e5
2 changed files with 7 additions and 2 deletions
  1. +6
    -1
      install.sh
  2. +1
    -1
      uninstall.sh

+ 6
- 1
install.sh View File

@@ -14,7 +14,12 @@ install -m 644 uninstall.sh /usr/local/bin/uninstall-log2ram.sh
systemctl enable log2ram.service log2ram-daily.timer

# logrotate
install -m 644 log2ram.logrotate /etc/logrotate.d/log2ram
if [ -d /etc/logrotate.d ]; then
install -m 644 log2ram.logrotate /etc/logrotate.d/log2ram
else
echo "##### Directory /etc/logrotate.d does not exist. #####"
echo "##### Skipping log2ram.logrotate installation. #####"
fi

# Remove a previous log2ram version
rm -rf /var/log.hdd


+ 1
- 1
uninstall.sh View File

@@ -13,7 +13,7 @@ then
rm -rf /etc/systemd/system/log2ram*
rm /usr/local/bin/log2ram
rm /etc/log2ram.conf
rm /etc/logrotate.d/log2ram
rm -f /etc/logrotate.d/log2ram

if [ -d /var/hdd.log ]; then
rm -r /var/hdd.log


Loading…
Cancel
Save