Installing as a service on ubuntu without systemd

Can please point to this configuration files? The docs only talk about systems with systemd. I have ubuntu server 14.04 no systemd enabled.

Thanks

I recommend runit and the script included in the etc directory in the distribution.

Thanks

Can´t do that works:

runsvdir -P /etc/service log: o start ./run: access denied runsv syncthing: fatal: unable to start ./run: access denied runsv syncthing: fatal: unable to start ./run: access denied runsv syncthing: fatal: unable to start ./run: access denied runsv syncthing: fatal: unable to start ./run: access denied runsv syncthing: fatal: unable to start ./run: access denied runsv syncthing: fatal: unable to start ./run: access denied

my run file

#!/bin/sh

export USERNAME=xxxxxxx export HOME="/home/$USERNAME" export SYNCTHING="/usr/bin/syncthing"

exec 2>&1 exec chpst -u “$USERNAME” “$SYNCTHING” -logflags 0

I borrowed a startup script that was written for BTSync and modified its settings to work with syncthing. You can find the original script at http://bernaerts.dyndns.org/linux/75-debian/290-debian-server-btsync-permanent-peer .

I changed the parameters of the script to the following:

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Syncthing server"
NAME="syncthing"
USER=$NAME
GROUP="syncthing"
DAEMON=/usr/bin/$NAME
DAEMON_OPTS=-gui-address=0.0.0.0:8384
PIDFILE=/var/run/$NAME/$NAME.pid

It’s been so long since I set this up I can’t remember if I had to manually create a service account. If I did, the command was

useradd -G sharing -m -d /home/syncthing -r -U syncthing

Lastly, make that script executable

chmod +x /etc/init.d/syncthing
update-rc.d syncthing defaults

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.