run script with systemd on every mount of USB external disk -
i want run rsync backup script every time power on external disk. created oneshot systemd service not starting on mount.
[unit] description=rsync backup files 1 disk after=media-wd_ext.mount requires=media-wd_ext.mount [service] type=oneshot execstart=/root/bin/rsync_backup.sh remainafterexit=true standardoutput=journal [install] wantedby=multi-user.target
disk automounted fstab with
uuid=.. /media/wd_ext ext4 auto,nofail,noatime,x-systemd.automount,x-systemd.device-timeout=1 0 2
what doing wrong?
Comments
Post a Comment