Hello, i do this to launch slideshow when i plug an USB KEY :
I Created this file /storage/.config/system.d/usb-mount.service
Code
[Unit]
Description=Mount USB Drive on %i
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/storage/.config/usb-mount.sh
ExecStop=
after i run
I Created this file /storage/.config/usb-mount.sh
and after
I Created this file /storage/.config/usb-play.sh
and after
I Created this file /storage/.config/udev.rules.d/99-usb-autoplay.rules
Code
KERNEL=="sd*", SUBSYSTEMS=="block", ACTION=="add", RUN+="/bin/systemctl start usb-mount.service"
KERNEL=="sd*", SUBSYSTEMS=="block", ACTION=="remove", RUN+="/bin/systemctl stop usb-mount.service"
and