0

I added a WebDAV folder to /etc/fstab

https://my.owncloud.de/remote.php/dav/files/matt/ /home/matt/Owncloud davfs user,rw,auto 0 0

but when it's mounted then Ubuntu doesn't shut down. See more details in the attached image.

Shutdown

1 Answers1

1
  1. Create a custom script for unmount

    nano /home/matt/Scripts/umountCloud.sh

  2. Add unmount command

    umount /home/matt/Owncloud

  3. Make it executable

    chmod +x /home/matt/Scripts/umountCloud.sh

  4. Create a systems script

    sudo nano /etc/systemd/system/preShutdown.service

  5. Add following lines to execute the custom script on shutdown

    [Unit] Description=Shutdown Process

    [Service] Type=oneshot ExecStart=/home/matthias/Scripts/umountCloud.sh

    [Install] WantedBy=multi-user.target