Commit Graph

55 Commits

Author SHA1 Message Date
Lukas Pirl d72b910700 make hourly Cron job quiet
otherwise, systems that are able to send mails would send the uninteresting output every hour to the admin
2017-07-25 10:05:03 +02:00
azlux 2e55fa7bed mail if error 2017-07-18 00:46:54 +02:00
azlux 150136da42 Merge pull request #19 from Sailing74/fixoutofram
unmount tmpfs if RAM too small to prevent corruption of logdir
2017-07-18 00:38:50 +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 9d76a1b082 /me trying to fixe apache2 2017-06-11 20:14:35 +02:00
azlux 1e18687475 REBOOT after install
It's maybe the pb of #17
2017-06-02 19:56:57 +02:00
azlux ea486efb5f bash error
source function not available into every /bin/sh
2017-05-02 15:13:05 +02:00
azlux b232b00950 bad copy/paste ? 2017-05-02 14:47:59 +02:00
azlux a54aee856d Configuration file added 2017-05-02 00:43:37 +02:00
azlux 931054c8d9 Typo 2017-04-27 11:24:05 +02:00
azlux c7870156ec Merge pull request #14 from Sailing74/checkdirsize
Added check of tmpfs size before syncing HDD to RAM.
2017-04-19 13:13:35 +02:00
Sailing74 df63737eac Added check of tmpfs size before syncing HDD to RAM. 2017-04-18 15:53:36 +02:00
azlux 18ace5438f typo 2017-04-12 13:29:54 +02:00
azlux d8080fe551 Update
Don't need the section "before" anymore.
Upgrade the license to a valid one.
2017-04-12 13:28:56 +02:00
azlux 05a31e0e35 Merge pull request #12 from zador-blood-stained/master
Update service dependencies to start on early boot
2017-04-11 21:21:42 +02:00
zador-blood-stained 01632f9cb1 Update service dependencies to start on early boot
This changes log2ram dependencies to start as early as possible, before other
services that may require access to /var/log, including rsyslog and
systemd-journald.

Additional dependencies on shutdown.target are required to ensure that
the service will be stopped at shutdown/reboot when DefaultDependencies
is set to "no" [1].

RequiresMountsFor declares dependency on /var mount when it is a mount point.

IgnoreOnIsolate prevents stopping the service when isolating another unit.

[1]: https://www.freedesktop.org/software/systemd/man/systemd.service.html
2017-04-11 20:47:02 +03:00
azlux 13e694c56b Warning added 2017-04-11 18:57:52 +02:00
azlux 7d4a20084b Update for the new default feature 2016-12-02 18:34:50 +01: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
azlux 0435ec3abb Merge pull request #8 from NickDaly/hourly-cron
Sync the ramlog back to disk, hourly.
2016-12-01 01:27:33 +01:00
Nick Daly e9b190983d Write sync status to HDD_LOG/log2ram.log. (#7)
* 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.

* Split sync into syncFromDisk and syncToDisk.

- After restarting, I realized that I had combined both types of sync
  into one line, when the syncing failed.  This fixes that bug.

* Exclude log2ram.log from rsync so rsync doesn't delete it on sync.
2016-12-01 01:27:06 +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 edd77da64e Update README.md 2016-10-20 12:47:56 +02:00
azlux 83be051ed8 oneshot add
From @datenklause
With Type=oneshot, systemd waits until the start action has completed
before it considers the unit to be active, so dependencies start only
after the start action has succeeded. With Type=simple, dependencies
will start immediately after the start action has been dispatched.
2016-10-20 12:41:47 +02: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 c8c0e1a392 typo 2016-10-17 10:12:32 +02:00
azlux 9a87d0f940 more info 2016-10-11 15:18:54 +02:00
azlux a2da447c37 Update README.md 2016-08-29 11:55:28 +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
Sailing74 e50a968dce no x flag for logr2ram.server (#3)
no x flag for logr2ram.server
2016-08-02 20:55:15 +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 381f24933a Merge pull request #2 from Sailing74/patch-2
Move "Before" to "[Unit]"
2016-07-30 20:49:39 +02:00
azlux 1a18c56d07 Merge pull request #1 from Sailing74/patch-1
Update README.md to correct path to log2ram
2016-07-30 20:38:42 +02:00
Sailing74 5235641f44 Move "Before" to "[Unit]"
This tweak is required to make it run under Ubuntu 16.04
2016-07-30 16:41:58 +02:00
Sailing74 084f53304a Update README.md to correct path to log2ram 2016-07-30 16:39:57 +02:00
azlux e752e4890b muffins ! 2016-04-20 10:47:39 +02:00
azlux 48980b2de2 I miss all chmod 2016-04-18 14:12:30 +02:00
azlux f557cedfc6 chmod needed 2016-04-18 14:09:47 +02:00
azlux f667036300 sudo check 2016-04-18 14:07:20 +02:00
azlux 0f892a82fb Update README.md 2016-04-18 12:09:32 +02:00
azlux 873593776b forget the #! 2016-04-18 12:07:33 +02:00
azlux 4df5b08121 Create install.sh 2016-04-18 12:06:16 +02:00
azlux 1e00b9557e Create log2ram 2016-04-18 12:05:19 +02:00