瀏覽代碼

Silence errors when logrotate is not installed

Co-authored-by: emwe1 <emwe1@users.noreply.github.com>
pull/117/head
Samuel FORESTIER 4 年之前
父節點
當前提交
0fdf8827e5
共有 2 個檔案被更改,包括 7 行新增2 行删除
  1. +6
    -1
      install.sh
  2. +1
    -1
      uninstall.sh

+ 6
- 1
install.sh 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存