Commit Graph

50 Commits

Author SHA1 Message Date
HyP3r bf8f16bba6
Added awareness of systemd-journald (#200)
* Reformatted and refactored some files

* Added awareness of systemd-journald
- Added dependency for bash in debian control file, because this implementation uses bash arrays
- Changed in all shell scripts the interpreter to bash
- Replaced "service log2ram stop" with "systemctl stop log2ram"
- Replaced "-a" with "] && ["
- Increased SIZE and LOG_DISK_SIZE to 128M and 256M because journald can use a lot of space
- Introduced a new switch JOURNALD_AWARE
2022-12-13 15:11:13 +01:00
Andreas Fendt e16ea0a4dd Reformatted and refactored some files 2022-12-01 13:58:54 +01:00
Azlux fd7cebbd1d check if folder exist
Fix for #147
2022-03-04 13:54:33 +01:00
twojstaryzdomu 7f810f6f25 Restore USE_RSYNC variable for backwards compatibility 2022-02-03 12:13:37 +01:00
Azlux 2c3f86134d Fix flush log, rare race condition
No obvious, should fix the issue
2022-01-05 22:25:07 +01:00
MegaV0lt 549288f8d4
Support path with spaces (#130)
* Add quotes and support path with spaces
* Using findmnt instead of mount | grep
findmnt is part of util-linux and should be available on almost all systems
2020-09-30 09:52:39 +02:00
Azlux 1af7db2b28 rsync by default #115 + fix #119 2020-07-22 22:07:02 +02:00
Azlux 324902da44 rollback #111 2020-05-22 10:45:30 +02:00
Azlux 1406472d8a Small check in case config not good 2020-05-21 20:37:27 +02:00
Azlux 6d5b84ba75 fix indent 2020-05-20 02:04:34 +02:00
organic-ip 013ab903e5 indentation fix 2020-05-19 23:27:13 +02:00
organic-ip 4db08b8e52 work with mount point read-only mode 2020-05-14 23:20:20 +02:00
azlux 3efc8f35cf
preserve context make issue on many OS
fix #108
2020-05-09 12:17:02 +02:00
Azlux 31e4409fc3 typo fix #107 2020-05-07 13:46:01 +02:00
Azlux 881eea145f add size check for zram
fix #99
2020-05-07 11:52:44 +02:00
Azlux f6432fa708 Fix for #57 2020-05-04 22:11:17 +02:00
Azlux f6e81bc8c1 Additionnal path
feature for #96
2020-05-03 21:51:44 +02:00
David MICHEL 0dc5827f5c typo fix + fix rsync command
fix for #92 , bad fuzzy parameter
2019-09-20 14:18:54 +02:00
Azlux bd38f34a25 better rsync use
typo #82, improvement #81
2019-08-20 01:32:46 +02:00
StuartIanNaylor e2e1c65c5f make zram lines create and mount immediate 2019-03-09 14:43:41 +00:00
StuartIanNaylor f86c90f9d6 clean up 2019-03-09 00:24:14 +00:00
StuartIanNaylor 34d32373c3 Add zram functionality 2019-03-08 04:58:06 +00:00
azlux 16ebd29848 Use env instead of /bin/sh
better for flexible shell
2018-02-16 01:03:18 +01:00
azlux e439c5ffdd shellcheck typo
typo for #32
2018-02-16 00:55:45 +01:00
Nathan Huizinga e6d71736c8 Removed unneeded postrotate support 2017-12-29 10:15:43 +01:00
Nathan Huizinga 8a16abbd76 Fixed: /var/log/log2ram.log handled like all other files. 2017-12-20 10:56:05 +01:00
Nathan Huizinga dc8c788e05 Added logrotate support 2017-12-16 20:33:20 +01:00
Nathan Huizinga 8e52dfe231 Revert "Added start, write and stop logging"
This reverts commit 4479c11a41.
2017-12-10 22:37:51 +01:00
Nathan Huizinga 4479c11a41 Added start, write and stop logging 2017-12-07 20:56:57 +01:00
Nathan Huizinga 658161bb04 Fixed consistent naming of /var/hdd.log 2017-12-07 17:42:40 +01:00
Sailing74 585432f0fa
use rm -f instead of rm
Suppresses an error message, if the file does not exist.
2017-11-06 08:32:45 +01:00
azlux b7c725f47d Fix for #28
The init is useless and the mount was async.
2017-10-02 20:37:46 +02:00
azlux 2e55fa7bed mail if error 2017-07-18 00:46:54 +02:00
Sailing74 da1950989f unmount tmpfs if RAM too small to prevent corruption of logdir 2017-07-14 08:51:22 +02:00
azlux bd1b669ed9 Stupid I am
Log on disk wasn't copy on install, so the shutdown destroy everything.
#18 #17
2017-06-11 20:59:57 +02:00
azlux ea486efb5f bash error
source function not available into every /bin/sh
2017-05-02 15:13:05 +02:00
azlux a54aee856d Configuration file added 2017-05-02 00:43:37 +02:00
Sailing74 df63737eac Added check of tmpfs size before syncing HDD to RAM. 2017-04-18 15:53:36 +02:00
Nick Daly 6d57e5fcef Remove log2ram log on startup, add usage. (#9)
Remove log2ram log on startup.
2016-12-02 01:26:09 +01:00
Nick Daly 8d440eab6c Exclude log2ram.log from rsync so rsync doesn't delete it on sync. 2016-11-30 13:09:39 -06:00
Nick Daly ac75c3dac1 Merge in the split-sync changes from master. 2016-11-30 12:29:28 -06:00
Nick Daly e238849069 Sync the ramlog back to disk, hourly.
- Since the cron job could be called before the user reboots after
  install (or if log2ram is disabled), we check that the hdd log
  location exists before syncing.

- Copy the log2ram.hourly sync script to cron's hourly directory on
  install.
2016-11-30 11:41:41 -06:00
Nick Daly 7d825982ae Write sync status to HDD_LOG/log2ram.log.
- Store sync status directly in the HDD log, to make sure we know
  about it if something fails.  This won't help if the HDD_LOG
  variable is borked, but it'll help with everything else.

- Made sync a function to avoid repeating five lines three times.

- log2ram now requires (cp or rsync) and tee, mount, umount.
2016-11-30 11:24:41 -06:00
azlux 5e0014c848 for dash compatibility 2016-10-18 10:25:27 +02:00
azlux e54ed85681 if condition issue 2016-10-18 00:32:27 +02:00
azlux aefbdb7c99 if condition correction 2016-10-18 00:31:24 +02:00
azlux 7ec00e8a95 Update log2ram 2016-08-29 11:54:11 +02:00
azlux a967244a73 rsyn as option
thank hardvk0 from armbian forum
2016-08-29 11:51:34 +02:00
azlux 8da521ab25 Better mount name
The name of the mount point is now log2ram
2016-08-01 10:25:43 +02:00
azlux 1e00b9557e Create log2ram 2016-04-18 12:05:19 +02:00