The last bracket shall not be glued to the directory.
The actual code is generating a runtime error like the following :
erwan@raspberrypi:~/download/log2ram $ sudo ./install.sh
Created symlink /etc/systemd/system/sysinit.target.wants/log2ram.service → /etc/systemd/system/log2ram.service.
./install.sh: 19: [: missing ]
##### Reboot to activate log2ram #####
This patch simply adds the missing space to make this script work.
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
* 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.
- 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.
- 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.