#902443 Please add DAEMON_OPS to the service file

Package:
quassel-core
Source:
quassel
Description:
distributed IRC client - core component
Submitter:
Alf Gaida
Date:
2018-12-12 22:15:03 UTC
Severity:
normal
#902443#5
Date:
2018-06-26 20:04:26 UTC
From:
To:
Dear maintainer,

please add DAEMON_OPTS to the service file similar to the init:

start_server() {
     start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \
     --background --chuid $DAEMONUSER --exec $DAEMON \
     -- --logfile=$LOGFILE --loglevel=$LOGLEVEL --configdir=$DATADIR \
     --port=$PORT \
     $DAEMON_OPTS }

ExecStart=/usr/bin/quasselcore --configdir=${DATADIR} --logfile=${LOGFILE} --loglevel=${LOGLEVEL} --port=${PORT}

should be

ExecStart=/usr/bin/quasselcore --configdir=${DATADIR} --logfile=${LOGFILE} --loglevel=${LOGLEVEL} --port=${PORT} ${DAEMON_OPTS}


Cheers Alf

#902443#12
Date:
2018-12-11 16:03:06 UTC
From:
To:
--loglevel=${LOGLEVEL} --port=${PORT}
--loglevel=${LOGLEVEL} --port=${PORT} ${DAEMON_OPTS}

What does this accomplish?  As far as I can see, DAEMON_OPTS is never defined
(defaults isn't sourced and AIUI there's no easy way to do that).

Scott K

#902443#17
Date:
2018-12-12 01:09:17 UTC
From:
To:
It is defined in /etc/init.d/quasselcore (with value "", but one can change
that)

#902443#22
Date:
2018-12-12 01:48:25 UTC
From:
To:
Right, but that's for sysv init, not the systemd service file.  I don't believe systemd looks in /etc/init.d at all.

Did you test this?

Scott K

#902443#27
Date:
2018-12-12 03:43:26 UTC
From:
To:
I didn't test it. I just noticed that it was defined for sysv-init and used
there and afaict, Alf was requesting a similar functionality for systemd.
(I don't even know how it could/should be done in systemd)

My reaction was in response to "DAEMON_OPTS is never defined"

#902443#32
Date:
2018-12-12 03:47:37 UTC
From:
To:
OK. I guess I should have been clearer:

Never defined in the systemd unit file.

Scott K

#902443#37
Date:
2018-12-12 04:00:32 UTC
From:
To:
I agree. Consequently the patch seems incomplete.

Now your other remark also 'lands' with me. The differences between init
systems seem undesirable to me. Probably best fixed upstream.

#902443#42
Date:
2018-12-12 04:51:58 UTC
From:
To:
Unfortunately, they are intentional (different design goals/philosophies), so
it's not particularly solvable (and let's not have this devolve into another
sysv init versus systemd thread - they are what they are).

Scott K

#902443#47
Date:
2018-12-12 22:10:51 UTC
From:
To:
$DAEMON_OPTS should be empty most of the time - there are several ways
to set them.

/etc/environment, an environment file after the preset in the unit file
- my intention was to have daemon options respected if one has to set
them - most used daemon opts might be:
       -n, --norestore
              Don't restore last core's state
       -d, --debug
              Enable debug output

@Diederik - it wasn't a patch only a question or suggestion - the needed
parts are already implemented here:


The defaults are set in the service file and optional in
/etc/default/quassel

├─quasselcore --configdir=/var/lib/quassel
--logfile=/var/log/quassel/core.log --loglevel=Info --port=4242
--listen=::,0.0.0.0

So if i change PORT=4241 in /etc/default/quasselcore after a service
restart it will look like

├─quasselcore --configdir=/var/lib/quassel
--logfile=/var/log/quassel/core.log --loglevel=Info --port=4241
--listen=::,0.0.0.0


The only thing missed in the service file is the "placeholder" for
DAEMON_OPTS - and the empty options in /etc/default/quasselcore.

Please trust me that one will need these options from time to time. And
if the options could be changed without changing the service file would
be great.

DAEMON_OPTS="--debug --norestore"

leads too
           └─21277 /usr/bin/quasselcore --configdir=/var/lib/quassel
--logfile=/var/log/quassel/core.log --loglevel=Info --port=4241
--listen=::,0.0.0.0 --debug --norestore

And i was wrong with ${DAEMON_OPTS} - it should be DAEMON_OPTS,
otherwise it would be limited to one option.

Will prepare a merge request if you agree.

Cheers Alf