From bd1b669ed9cc3f5a082679d26d4e8eb4edf17e15 Mon Sep 17 00:00:00 2001 From: azlux Date: Sun, 11 Jun 2017 20:59:57 +0200 Subject: [PATCH] Stupid I am Log on disk wasn't copy on install, so the shutdown destroy everything. #18 #17 --- install.sh | 1 + log2ram | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/install.sh b/install.sh index 04e15c6..97a5766 100644 --- a/install.sh +++ b/install.sh @@ -11,6 +11,7 @@ then systemctl enable log2ram cp log2ram.hourly /etc/cron.hourly/log2ram chmod +x /etc/cron.hourly/log2ram + /usr/local/bin/log2ram init echo "##### Reboot to activate log2ram #####" else diff --git a/log2ram b/log2ram index 9ef90d5..0f455e8 100755 --- a/log2ram +++ b/log2ram @@ -57,6 +57,12 @@ case "$1" in write) syncToDisk ;; + + init) + [ -d $HDD_LOG ] || mkdir $HDD_LOG + cp -rfup $RAM_LOG -T $HDD_LOG 2>&1 | $LOG_OUTPUT + ;; + *) echo "Usage: log2ram {start|stop|write}" >&2 exit 1