I've got a tmpfs mounted to /var/something/else and I'd like to copy files to the location immediately after it's mounted. So if I run (or action executed after server reboot):
- files synced from hdd to tmpfs
- a daemon started
and it would be great if I run
- daemon stopped
- files synced from tmpfs to hdd
Yes, it's possible to modify init/systemd script of the daemon to do all the required (mount/umount/sync). But is there another option?
The rules in /etc/udev/rules.d/ does not seem to work here...if I get it right.