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.

34 line
850 B

  1. #!/usr/bin/env sh
  2. [ "$(id -u)" -eq 0 ] || { echo "You need to be ROOT (sudo can be used)"; exit 1; }
  3. # See if we can find out the init-system
  4. echo "Try to detect init..."
  5. if [ "$(systemctl --version)" != '' ] ; then
  6. INIT='systemd'
  7. elif [ "$(rc-service --version)" != '' ] ; then
  8. INIT='openrc'
  9. fi
  10. if [ "$INIT" = 'systemd' ] ; then
  11. service log2ram stop
  12. systemctl disable log2ram
  13. rm /etc/systemd/system/log2ram.service
  14. elif [ "$INIT" = 'openrc' ] ; then
  15. rc-service log2ram stop
  16. rc-update del log2ram boot
  17. rm /etc/init.d/log2ram
  18. fi
  19. rm /usr/local/bin/log2ram
  20. rm /etc/log2ram.conf
  21. rm /etc/cron.daily/log2ram
  22. rm /etc/logrotate.d/log2ram
  23. if [ -d /var/hdd.log ]; then
  24. rm -r /var/hdd.log
  25. fi
  26. echo "Log2Ram is uninstalled, removing the uninstaller in progress"
  27. rm /usr/local/bin/uninstall-log2ram.sh
  28. echo "##### Reboot isn't needed #####"