mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
bf8f16bba6
* Reformatted and refactored some files * Added awareness of systemd-journald - Added dependency for bash in debian control file, because this implementation uses bash arrays - Changed in all shell scripts the interpreter to bash - Replaced "service log2ram stop" with "systemctl stop log2ram" - Replaced "-a" with "] && [" - Increased SIZE and LOG_DISK_SIZE to 128M and 256M because journald can use a lot of space - Introduced a new switch JOURNALD_AWARE
26 lines
744 B
Bash
Executable File
26 lines
744 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if dpkg -l log2ram 2>/dev/null; then
|
|
echo "Please run : apt remove log2ram"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$(id -u)" -eq 0 ]; then
|
|
echo "Not apt installed. Remove will continue with this script..."
|
|
systemctl stop log2ram.service log2ram-daily.timer
|
|
systemctl disable log2ram.service log2ram-daily.timer
|
|
rm -rf /etc/systemd/system/log2ram*
|
|
rm /usr/local/bin/log2ram
|
|
rm /etc/log2ram.conf
|
|
rm -f /etc/logrotate.d/log2ram
|
|
|
|
if [ -d /var/hdd.log ]; then
|
|
rm -r /var/hdd.log
|
|
fi
|
|
echo "Log2Ram is uninstalled, removing the uninstaller in progress"
|
|
rm /usr/local/bin/uninstall-log2ram.sh
|
|
echo "##### Reboot isn't needed #####"
|
|
else
|
|
echo "You need to be ROOT (sudo can be used)"
|
|
fi
|