Skip to content

Running as a daemon

Hariprasanth S edited this page Oct 16, 2020 · 1 revision

Synchly can be run as a daemon, init.d and systemd unit files are bundled with the npm package to make this easier.

If installed using npm:

init.d

$ npm install --global synchly
$ sudo cp /usr/local/lib/node_modules/synchly/bin/synchly.conf /etc/init
$ sudo start synchly

systemd

$ npm install --global synchly
$ cp /usr/local/lib/node_modules/synchly/bin/synchly.service  ~/.config/systemd/user/
$ systemctl --user enable synchly
$ systemctl --user start synchly

If the unit files are not there inside /usr/local/lib/node_modules, use npm root -g to get the global installation root path and copy the unit files from there. The WorkingDirectory field in the synchly.service unit file also needs to be changed, if the global installation root path is different from /usr/local/lib/node_modules.

If installed using yarn:

If installed using yarn global, the service init files will be located on

  • /usr/local/share/.config/yarn/global/node_modules/synchly/bin/ - if logged in as root
  • ~/.config/yarn/global/node_modules/synchly/bin - if logged in as non-root

NOTE: Don't forget to restart the daemon everytime you make a change to the configuration using the cli options.

Clone this wiki locally