mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
Silence errors when logrotate is not installed
Co-authored-by: emwe1 <emwe1@users.noreply.github.com>
This commit is contained in:
parent
a5c7f553df
commit
0fdf8827e5
@ -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
|
||||
|
@ -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…
x
Reference in New Issue
Block a user