1
0
mirror of https://github.com/azlux/log2ram.git synced 2023-10-10 13:37:24 +02:00

Stupid I am

Log on disk wasn't copy on install, so the shutdown destroy everything.
#18 #17
This commit is contained in:
azlux 2017-06-11 20:59:57 +02:00
parent 9d76a1b082
commit bd1b669ed9
2 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,7 @@ then
systemctl enable log2ram systemctl enable log2ram
cp log2ram.hourly /etc/cron.hourly/log2ram cp log2ram.hourly /etc/cron.hourly/log2ram
chmod +x /etc/cron.hourly/log2ram chmod +x /etc/cron.hourly/log2ram
/usr/local/bin/log2ram init
echo "##### Reboot to activate log2ram #####" echo "##### Reboot to activate log2ram #####"
else else

View File

@ -57,6 +57,12 @@ case "$1" in
write) write)
syncToDisk 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 echo "Usage: log2ram {start|stop|write}" >&2
exit 1 exit 1