Ok I changed RemainAfterExit=yes to RemainAfterExit=no - and now it can mount one or more drives but still whenever I get off usb it will not unmount and the systemctl status is dead and not unmounting.
This means that when I remove the usb my script with removing function is not invoked!
And when I hit manually run systemctl start usb_mount@remove.service then all removed usb are unmouted in the system.
So probably the problem is how to start ExecStop=/usr/local/bin/usb_mount.sh remove %i from the usb_mount@remove.service when removing usb?
This means that when I remove the usb my script with removing function is not invoked!
And when I hit manually run systemctl start usb_mount@remove.service then all removed usb are unmouted in the system.
So probably the problem is how to start ExecStop=/usr/local/bin/usb_mount.sh remove %i from the usb_mount@remove.service when removing usb?
Statistics: Posted by jager — 2024-09-15 20:48