#1104423 squeezelite: Squeezelite service does not start if SL_NAME has a space in it

Package:
squeezelite
Source:
squeezelite
Description:
lightweight headless Squeezebox emulator - ALSA version
Submitter:
Philip Herzog
Date:
2025-04-29 20:45:03 UTC
Severity:
normal
#1104423#5
Date:
2025-04-29 20:39:21 UTC
From:
To:
Dear Maintainer,

if i give my squeezelite a name with a space in it it doesn't start:

phil@squeezelite:~/bin $ fgrep SL_NAME /etc/default/squeezelite
SL_NAME="Squeezelite TV"
phil@squeezelite:~/bin $ sudo service squeezelite start
phil@squeezelite:~/bin $ sudo service squeezelite status
● squeezelite.service - LSB: Lightweight headless Squeezebox emulator
     Loaded: loaded (/etc/init.d/squeezelite; generated)
     Active: active (exited) since Thu 2025-03-20 20:08:47 CET; 3s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 2021 ExecStart=/etc/init.d/squeezelite start (code=exited, status=0/SUCCESS)
        CPU: 363ms

Mar 20 20:08:47 squeezelite systemd[1]: Starting squeezelite.service - LSB: Lightweight headless Squeezebox emulator...
Mar 20 20:08:47 squeezelite systemd[1]: Started squeezelite.service - LSB: Lightweight headless Squeezebox emulator.


Without a space in the name everything's fine:

phil@squeezelite:~/bin $ fgrep SL_NAME /etc/default/squeezelite
SL_NAME="Squeezelite_TV"
phil@squeezelite:~/bin $ sudo service squeezelite start
phil@squeezelite:~/bin $ sudo service squeezelite status
● squeezelite.service - LSB: Lightweight headless Squeezebox emulator
     Loaded: loaded (/etc/init.d/squeezelite; generated)
     Active: active (running) since Thu 2025-03-20 20:09:28 CET; 8s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 2086 ExecStart=/etc/init.d/squeezelite start (code=exited, status=0/SUCCESS)
      Tasks: 2 (limit: 178)
        CPU: 753ms
     CGroup: /system.slice/squeezelite.service
             └─2093 /usr/bin/squeezelite -n Squeezelite_TV

Mar 20 20:09:28 squeezelite systemd[1]: Starting squeezelite.service - LSB: Lightweight headless Squeezebox emulator...
Mar 20 20:09:28 squeezelite systemd[1]: Started squeezelite.service - LSB: Lightweight headless Squeezebox emulator.


Now I thought that should be easy to fix, just edit /etc/init.d/squeezelite and change

        # add squeezelite name if set
        if [ -n "$SL_NAME" ]; then
                DAEMON_ARGS="${DAEMON_ARGS} -n ${SL_NAME}"
        fi

to

        # add squeezelite name if set
        if [ -n "$SL_NAME" ]; then
                DAEMON_ARGS="${DAEMON_ARGS} -n \"${SL_NAME}\""
        fi

but the problem persists.

Best Regards,

Philip Herzog