Bug#959380: mpd: Can't disable mpd easily

2020-05-01 Thread kaliko
Hi,

Le 01/05/2020 à 18:48, eingousef a écrit :
> I'd like to disable mpd at startup to only enable it when I need
> it. (e.g., in a user console : mpd ; ncmpc ; mpd --kill;)

With the current setup and using systemd you can disable mpd.service and keep 
mpd.socket
enabled :

systemctl disable mpd.service
systemctl enable mpd.socket

Then mpd is disable at startup but mpd.socket will launched it as soon as a 
client open
[::]:6600 over the network or locally /run/mpd/socket.


> The only way I've found to disable the service permanently is to
> comment the line […]

What's wrong with systemd commands:

systemctl stop mpd
systemctl disable mpd

That will prevent mpd from starting at boot (both service and socket) but allow 
you to
run it when you want with "systemctl start mpd".

Is this a better solution for your use case?
Cheers
k



signature.asc
Description: OpenPGP digital signature


Bug#959380: mpd: Can't disable mpd easily

2020-05-01 Thread eingousef
Package: mpd
Version: 0.21.22-1
Severity: important

Dear Maintainer,

I'd like to disable mpd at startup to only enable it when I need
it. (e.g., in a user console : mpd ; ncmpc ; mpd --kill;)

I can do stuff like 'update-rc.d mpd disable' or 'update-rc.d -f mpd
remove' or 'insserv -r mpd', but none of them will permanently disable
mpd : the /etc/rc?.d/*mpd files will be reinstalled at each upgrade.

The only way I've found to disable the service permanently is to
comment the line :

pid_file"/run/mpd/pid"

in the "/etc/mpd.conf" and save the file under "/etc/mpd.local", and
then to add the line :

MPDCONF=/etc/mpd.local

in "/etc/default/mpd".

I haven't tested this solution, but it should work. It looks ugly
though.

It would be better if there was an "AUTOSTART=(true|false)" option or
something similar in /etc/default/mpd , like in most debian services.

Regards,

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (990, 'testing'), (980, 'stable-updates'), (980, 'stable'), (500, 
'oldstable-updates'), (500, 'oldstable'), (90, 'experimental'), (90, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.5.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages mpd depends on:
ii  adduser   3.118
ii  init-system-helpers   1.57
ii  libadplug-2.3.1-0 2.3.1+dfsg-2
ii  libao41.2.2+20180113-1+b1
ii  libasound21.2.2-2.1
ii  libaudiofile1 0.3.6-5
ii  libavahi-client3  0.7-5
ii  libavahi-common3  0.7-5
ii  libavcodec58  7:4.2.2-1+b1
ii  libavformat58 7:4.2.2-1+b1
ii  libavutil56   7:4.2.2-1+b1
ii  libbz2-1.01.0.8-2
ii  libc6 2.30-4
ii  libcdio-cdda2 10.2+2.0.0-1+b1
ii  libcdio-paranoia2 10.2+2.0.0-1+b1
ii  libcdio18 2.0.0-2
ii  libcurl3-gnutls   7.68.0-1
ii  libdbus-1-3   1.12.16-2
ii  libexpat1 2.2.9-1
ii  libfaad2  2.9.1-1
ii  libflac8  1.3.3-1
ii  libfluidsynth22.1.1-2
ii  libgcc-s1 10-20200418-1
ii  libgcrypt20   1.8.5-5
ii  libgme0   0.6.3-2
ii  libicu63  63.2-3
ii  libid3tag00.15.1b-14
ii  libiso9660-11 2.0.0-2
ii  libixml10 1:1.8.4-2
ii  libjack0 [libjack-0.125]  1:0.125.0-3+b1
ii  libjs-sphinxdoc   2.4.3-2
ii  libmad0   0.15.1b-10
ii  libmikmod33.3.11.1-4
ii  libmms0   0.6.4-3
ii  libmodplug1   1:0.8.9.0-2
ii  libmp3lame0   3.100-3
ii  libmpcdec62:0.1~r495-2
ii  libmpdclient2 2.18-1
ii  libmpg123-0   1.25.13-1
ii  libnfs13  4.0.0-1
ii  libogg0   1.3.2-1+b1
ii  libopenal11:1.19.1-1+b1
ii  libopus0  1.3-1+b1
ii  libpcre3  2:8.39-12+b1
ii  libpulse0 13.0-5
ii  libsamplerate00.1.9-2
ii  libshout3 2.4.3-1
ii  libsidplayfp4 1.8.8-1+b1
ii  libsmbclient  2:4.11.5+dfsg-1+b1
ii  libsndfile1   1.0.28-7
ii  libsndio7.0   1.5.0-3
ii  libsoxr0  0.1.3-1
ii  libsqlite3-0  3.31.1-5
ii  libstdc++610-20200418-1
ii  libsystemd0   245.5-2
ii  libupnp13 1:1.8.4-2
ii  libvorbis0a   1.3.6-2
ii  libvorbisenc2 1.3.6-2
ii  libwavpack1   5.3.0-1
ii  libwildmidi2  0.4.3-1
ii  libyajl2  2.1.0-3
ii  libzzip-0-13  0.13.62-3.2
ii  lsb-base  11.1.0
ii  zlib1g1:1.2.11.dfsg-2

mpd recommends no packages.

Versions of packages mpd suggests:
pn  avahi-daemon  
pn  icecast2  
ii  mpc [mpd-client]  0.33-1
ii  ncmpc [mpd-client]0.35-1
ii  ncmpcpp [mpd-client]  0.8.2-0.1+b1
pn  pulseaudio

-- Configuration Files:
/etc/default/mpd changed:
MPDCONF=/etc/mpd.local


-- no debconf information