I'm setting up a Raspberry Pi 3 as a Tor relay with Arch Linux for ARM, as replacement for an older Raspberry with Raspbian.
To avoid writes to Flash memory, I've been working with read-only partitions and [code]tmpfs[/code] file systems for log files and some other data.
On Debian (Raspbian), [code]/etc/rc.local[/code] triggered a script after partitions were made available via [code]/etc/fstab[/code] but before regular services are started.
[code]/var/lib/tor[/code] is a [code]tmpfs[/code].
[code]/var/lib/tor/key[/code] is created as a mountpoint.
Then a small persistent filesystem is mapped to [code]/var/lib/tor/key[/code].
This script has to be executed after filesystems are mounted via [code]/etc/fstab[/code], but before the Tor daemon starts.
[b]What's the best way with Arch Linux to achieve the same behaviour?
[/b]
E.g. a systemd script, and making somehow sure that it runs before the Tor service is started?
Thanks!