Comment on What is easiest solution to automatically resolve missing mounts due to e.g. a power outage?

<- View Parent
avidamoeba@lemmy.ca ⁨4⁩ ⁨months⁩ ago

This is the answer. You can straight up make things dependent on .mount units that represent stuff in fstab. To add, you can create any number of systemd services that just check if something is “as you want it” and only then “start”. You simply make the Exec line “/bin/bash -c ‘your script here’”. Then you make whatever else you want dependent on it. For example I have such a unit that monitors for Internet connection by checking some public DNS servers. Then I have services that depend on Internet connection dependent on that.

source
Sort:hotnewtop