You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

uninstall.sh 744 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env bash
  2. if dpkg -l log2ram 2>/dev/null; then
  3. echo "Please run : apt remove log2ram"
  4. exit 1
  5. fi
  6. if [ "$(id -u)" -eq 0 ]; then
  7. echo "Not apt installed. Remove will continue with this script..."
  8. systemctl stop log2ram.service log2ram-daily.timer
  9. systemctl disable log2ram.service log2ram-daily.timer
  10. rm -rf /etc/systemd/system/log2ram*
  11. rm /usr/local/bin/log2ram
  12. rm /etc/log2ram.conf
  13. rm -f /etc/logrotate.d/log2ram
  14. if [ -d /var/hdd.log ]; then
  15. rm -r /var/hdd.log
  16. fi
  17. echo "Log2Ram is uninstalled, removing the uninstaller in progress"
  18. rm /usr/local/bin/uninstall-log2ram.sh
  19. echo "##### Reboot isn't needed #####"
  20. else
  21. echo "You need to be ROOT (sudo can be used)"
  22. fi