Unfortunately though, I don't seem to be able to make it autostart or run as a service.
The syncthing-inotify project gives two scripts (one to run as users and one as system), and I have tried both without success. They make syncthing-inotify start but it does not work (and rescans of the directories happen as usual).
I have also tried adding it to /etc/rc.local but it happens the same.
BTW, here are the two scripts provided by the project... If anyone more capable than me could make them work I would be extremely grateful:
Run as system service: /etc/systemd/system/syncthing-inotify@.service
Code: Select all
[Unit]
Description=Syncthing Inotify File Watcher for %I
Documentation=https://github.com/syncthing/syncthing-inotify/blob/master/README.md
After=network.target syncthing@.service
Requires=syncthing@.service
[Service]
User=%i
ExecStart=/usr/bin/syncthing-inotify -logflags=0
SuccessExitStatus=2
RestartForceExitStatus=3
Restart=on-failure
ProtectSystem=full
ProtectHome=read-only
[Install]
WantedBy=multi-user.target
Run as user: /etc/systemd/user/syncthing-inotify.service
Code: Select all
[Unit]
Description=Syncthing Inotify File Watcher
Documentation=https://github.com/syncthing/syncthing-inotify/blob/master/README.md
After=syncthing.service
Requires=syncthing.service
[Service]
ExecStart=/usr/bin/syncthing-inotify -logflags=0
SuccessExitStatus=2
RestartForceExitStatus=3
Restart=on-failure
ProtectSystem=full
ProtectHome=read-only
[Install]
WantedBy=default.target
Thanks!!