From 22dadff5340581720eaa920ab5d9c0f16a92c900 Mon Sep 17 00:00:00 2001 From: azlux Date: Wed, 18 Jul 2018 21:24:43 +0200 Subject: [PATCH] timeout added I add timeout. In case of failure, logram will not freeze the OS startup. --- README.md | 2 ++ log2ram.service | 1 + 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index ff18acb..c55f991 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ Like ramlog for systemd (on debian 8 jessie for example). Usefull for **RaspberryPi** for not writing on the SD card all the time. You need it because your SD card doesn't want to suffer anymore! +Explanations: The script creates a `/var/log` mount point in RAM. So any writing of the log to the `/var/log` folder will not actually be written to disk (in this case to the sd card for a raspberry card) but directly to RAM. By default, every hour, the CRON will launch a synchronization of the RAM to the folder located on the physical disk. The script will also make this copy of RAM to disk in case of machine shutdown (but cannot do it in case of power failure). This way you avoid excessive writing on the SD card. + The script [log2ram](https://github.com/azlux/log2ram) can work on every linux system. So you can use it with your own daemon manager if you don't have systemd. Log2Ram is based on transient log for Systemd here : [A transient /var/log](https://www.debian-administration.org/article/661/A_transient_/var/log) diff --git a/log2ram.service b/log2ram.service index cfe585c..89f1cb8 100644 --- a/log2ram.service +++ b/log2ram.service @@ -12,6 +12,7 @@ Type=oneshot ExecStart= /usr/local/bin/log2ram start ExecStop= /usr/local/bin/log2ram stop ExecReload= /usr/local/bin/log2ram write +TimeoutStartSec=120 RemainAfterExit=yes [Install]