From 9c774dcbb76b48b7e0fc85c12fcfd2af0d7a5480 Mon Sep 17 00:00:00 2001 From: azlux Date: Thu, 15 Feb 2018 22:39:25 +0100 Subject: [PATCH] Add uninstaller into /usr Suggestion from #46 --- README.md | 7 +++---- install.sh | 1 + uninstall.sh | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e1cf487..4ada860 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ Log2Ram is based on transient log for Systemd here : [A transient /var/log](http curl -Lo log2ram.tar.gz https://github.com/azlux/log2ram/archive/master.tar.gz tar xf log2ram.tar.gz cd log2ram-master - chmod +x install.sh && sudo ./install.sh + chmod +x log2ram-master/install.sh && sudo log2ram-master/install.sh + rm -r log2ram-master **REBOOT** before installing anything else (for example apache2) @@ -51,7 +52,5 @@ The log for log2ram will be written at: `/var/log/log2ram.log` ## Uninstall :( (Because sometime we need it) ``` -cd log2ram -chmod +x uninstall.sh -sudo ./uninstall.sh +chmod +x /usr/local/bin/uninstall-log2ram.sh && sudo /usr/local/bin/uninstall-log2ram.sh ``` diff --git a/install.sh b/install.sh index 33820b4..462d8a1 100644 --- a/install.sh +++ b/install.sh @@ -16,6 +16,7 @@ then chmod +x /etc/cron.hourly/log2ram cp log2ram.logrotate /etc/logrotate.d/log2ram chmod 644 /etc/logrotate.d/log2ram + cp uninstall.sh /usr/local/bin/uninstall-log2ram.sh # Remove a previous log2ram version if [ -d /var/log.hdd ]; then diff --git a/uninstall.sh b/uninstall.sh index 791bf91..a8d5d78 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -13,7 +13,8 @@ then 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)"