- Package:
- quassel-core
- Source:
- quassel
- Description:
- distributed IRC client - core component
- Submitter:
- Alf Gaida
- Date:
- 2018-12-12 22:15:03 UTC
- Severity:
- normal
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
--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
It is defined in /etc/init.d/quasselcore (with value "", but one can change that)
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
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"
OK. I guess I should have been clearer: Never defined in the systemd unit file. Scott K
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.
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
$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