Keeping Syncthing Inotify Running: Ubuntu Upstart

Ubuntu is the most popular flavour of *nix. The current Ubuntu uses Upstart for jobs. It is preferable to install the syncthing-inotify addon on Ubuntu as otherwise syncthing will use brute-force at regular intervals to scan for changes rather than sync the files immediately when they change.

However, for whatever reason, the Syncthing developers have not added upstart scripts to the /etc/ folder in the Syncthing or Syncthing-Inotify repos. Therefore I would be grateful if someone familiar with upstart can comment on the suitability/validity of this upstart script I have started working on for syncthing-inotify?

# syncthing-inotify - Syncthing Inotify File Watcher #

description "Syncthing Inotify File Watcher" author “neutreno”

start on (started syncthing and net-device-up IFACE!=lo) stop on (stopping syncthing or runlevel [016])


# use the same username and usergroup as you did for the main syncthing upstart service env HOME=/home/username setuid "username" setgid “usergroup”

exec /usr/local/bin/syncthing-inotify 2>&1 | logger -t syncthing-inotify


1 Like

Most likely we’re just not familiar with upstart. :slight_smile: (I use Ubuntu, but install runit for keeping services alive because I’m used to that from other places…)

It’ll be great to have in there though!

1 Like

Thanks for the fast reply! Makes sense and great to hear that you also use Ubuntu :smile: Interesting to hear how you have it set up. Also, it’s worth noting that the current systemd scripts in the repos will be more useful in the future as Ubuntu will be moving away from upstart to systemd for v15. But in the current version 14.10, systemd is there but unsupported and broken as only parts of it are working.

Hopefully we can find someone to review it with a view to adding it to the repo. I can provide a working upstart script for the main syncthing process too if needed, although there are already a few other attempts at that on the forums.

On a side note, I would be curious to hear if you know a laptop that has very good support for Ubuntu with dual external monitor support for productive coding…

Thinkpad + Docking station. :wink:

Thanks, looks very tempting! Starting to get fed up with Dell/Ubuntu compatibility issues on current laptop.

1 Like

Thinkpad’s linux support is quite good and a lof of workmates use the docking station. I don’t own a dockingstation myself (only a thinkpad) but they are quite happy with it. You just have a desktop like computer when it’s docked; and you can undock it and take it with you.

1 Like