Hello,
On Sun, 10 Jan 2021 17:34:57 +0100 <de...@sumpfralle.de> wrote: > * Forcing start-stop-daemon to create the PID file. > Synapse seems to fail to do this, see > https://github.com/matrix-org/synapse/issues/9066 indeed matrix-synapse does it properly - it just needs the "--daemonize" option. See my updated patch: it uses "--daemonize" (for matrix-synapse) instead of "--background" (for start-stop-daemon). (the removal of "--exec" in "stop" is unrelated and still necessary) This fixes the start/stop issue. Cheers, Lars
--- matrix-synapse.orig 2021-01-10 17:19:42.921852639 +0100 +++ matrix-synapse 2021-01-11 23:15:49.078774154 +0100 @@ -102,10 +89,12 @@ touch $PIDFILE chown $USER:nogroup $PIDFILE chown $USER:nogroup $SHAREDIR/media/ + + mkdir -p "$SHAREDIR/uploads" chown $USER:nogroup $SHAREDIR/uploads/ - start-stop-daemon --start --background --pidfile $PIDFILE --chuid $USER \ - --exec $PYTHON -- -m "synapse.app.homeserver" $CONFIGS || return 2 + start-stop-daemon --start --pidfile $PIDFILE --chuid $USER \ + --exec $PYTHON -- -m "synapse.app.homeserver" --daemonize $CONFIGS || return 2 return 0 } @@ -126,7 +115,7 @@ return $RETVAL fi - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --user $USER --exec $PYTHON + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --user $USER RETVAL="$?" [ "$RETVAL" = 2 ] && return 2