選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

26 行
883 B

  1. #!/usr/bin/env sh
  2. systemctl -q is-active log2ram && { echo "ERROR: log2ram service is still running. Please run \"sudo service log2ram stop\" to stop it."; exit 1; }
  3. [ "$(id -u)" -eq 0 ] || { echo "You need to be ROOT (sudo can be used)"; exit 1; }
  4. # log2ram
  5. mkdir -p /usr/local/bin/
  6. install -m 644 log2ram.service /etc/systemd/system/log2ram.service
  7. install -m 755 log2ram /usr/local/bin/log2ram
  8. install -m 644 log2ram.conf /etc/log2ram.conf
  9. install -m 644 uninstall.sh /usr/local/bin/uninstall-log2ram.sh
  10. systemctl enable log2ram
  11. # cron
  12. install -m 755 log2ram.cron /etc/cron.daily/log2ram
  13. install -m 644 log2ram.logrotate /etc/logrotate.d/log2ram
  14. # Remove a previous log2ram version
  15. rm -rf /var/log.hdd
  16. # Make sure we start clean
  17. rm -rf /var/hdd.log
  18. echo "##### Reboot to activate log2ram #####"
  19. echo "##### edit /etc/log2ram.conf to configure options ####"