bobafetthotmail / folder2ram

mount those folders to ram without losing access to their counterpart on disk!
GNU General Public License v3.0
110 stars 21 forks source link

Fix for systemd umount call problem on reboot, shutdown. #4

Closed mwehr closed 8 years ago

mwehr commented 8 years ago

Hi,

For some reason the current systemd config doesn't trigger the

ExecStop=/sbin/folder2ram -umountall

on reboot or shutdown.

What works for me is:

[Unit]
Description=folder2ram systemd service

[Service]
Type=oneshot
ExecStart=/sbin/folder2ram -mountall
ExecStop=/sbin/folder2ram -umountall
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

OS is Debian 8

regards,

Mario

bobafetthotmail commented 8 years ago

The issue is caused by the "DefaultDependencies=No" as that is a much more advanced option I should have not included.

The After and Before options must stay, as they are there to ensure that folder2ram is called as early as possible, when no program is initialized at all.

Anyway, fixed.