I am mounting my Google Drive on login using google-drive-ocamlfuse
. The problem is that shutting down or rebooting now seems to have an added 2 minute pause.
Now if when I unmount the Google Drive prior to shutting down, everything goes the way it should and there is no pause.
I inspected some systemd
services and built a new one without knowing exactly what I am doing ("educated guess").
/etc/systemd/system/rs-shutdown.service
:
# Redsandro 2017-09-1
# Unmount GoogleDrive to prevent shutdown delay.
[Unit]
Description=Unmount GoogleDrive on shutdown
Before=umount.target shutdown.target reboot.target halt.target
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
ExecStop=/bin/sh -c "umount /home/redsandro/GoogleDrive"
[Install]
WantedBy=multi-user.target
Then I ran:
sudo systemctl enable rs-shutdown.service
sudo systemctl start rs-shutdown.service
However, shutdown is still lagging by 2 minutes. I still need to manually unmount the share if I want a fast shutdown.
Is there a solution, or is this simply the wrong place to try and do what I want?
I'm Running Linux Mint 17 and Ubuntu 16.04.3.