Home of the Squeezebox™ & Transporter® network music players.
Page 4 of 4 FirstFirst ... 234
Results 31 to 36 of 36
  1. #31
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,640
    Quote Originally Posted by pantomnesia View Post
    I'm trying different things out, trial and error, simply because - as you say - it's picky.
    Picky but with well defined syntax. I'm surprised the backslash didn't work. As it is picky, the best way to approach is NOT trial and error but finding out the result of each attempt and what is failing .

    You could try running the /etc/init.d/squeezlite shell script from a login session with the "-x" option ahead of the

    if you are using bash then something like

    bash -x /etc/init.d/squeezlite

  2. #32
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,427
    Also ... which shell is it being run under when being initiated from the startup process?
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  3. #33
    Junior Member
    Join Date
    Nov 2020
    Posts
    19
    Quote Originally Posted by bpa View Post
    As it is picky, the best way to approach is NOT trial and error but finding out the result of each attempt and what is failing .
    I appreciate what you're saying, and your help, but I have to work with what I've got! I'm no techie so seeing where it's failing is beyond me! 'Trial and error' (after searching for alternatives to try) is all I know how to do!

    Here's the output of bash -x /etc/init.d/squeezelite start with SL_NAME="\"The Player\""

    Code:
    + PATH=/sbin:/usr/sbin:/bin:/usr/bin
    + DESC='Squeezebox client'
    + NAME=squeezelite
    + DAEMON=/usr/bin/squeezelite
    + PIDFILE=/run/squeezelite.pid
    + SCRIPTNAME=/etc/init.d/squeezelite
    + '[' -x /usr/bin/squeezelite ']'
    + '[' -r /etc/default/squeezelite ']'
    + . /etc/default/squeezelite
    ++ SL_NAME='"The Player"'
    ++ SL_SOUNDCARD=sysdefault:CARD=Headphones
    ++ SB_EXTRA_ARGS='-r 44100 -a :::0'
    + . /lib/init/vars.sh
    ++ TMPTIME=0
    ++ SULOGIN=no
    ++ DELAYLOGIN=no
    ++ UTC=yes
    ++ VERBOSE=no
    ++ FSCKFIX=no
    ++ '[' -f /etc/default/rcS ']'
    ++ unset EDITMOTD
    ++ unset RAMRUN
    ++ unset RAMLOCK
    ++ '[' -r /proc/cmdline ']'
    +++ cat /proc/cmdline
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ for ARG in $(cat /proc/cmdline)
    ++ case $ARG in
    ++ '[' '' ']'
    + . /lib/lsb/init-functions
    +++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
    ++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
    ++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']'
    ++ . /lib/lsb/init-functions.d/20-left-info-blocks
    ++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
    ++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
    ++ . /lib/lsb/init-functions.d/40-systemd
    +++ _use_systemctl=0
    +++ '[' -d /run/systemd/system ']'
    +++ '[' -n '' ']'
    +++ '[' squeezelite = init-d-script ']'
    +++ '[' squeezelite = start ']'
    +++ executable=/etc/init.d/squeezelite
    +++ argument=start
    +++ prog=squeezelite
    +++ service=squeezelite.service
    ++++ systemctl -p LoadState --value show squeezelite.service
    +++ state=loaded
    +++ '[' loaded = masked ']'
    +++ '[' 18557 -ne 1 ']'
    +++ '[' -z '' ']'
    +++ case $(readlink -f "$executable") in
    ++++ readlink -f /etc/init.d/squeezelite
    +++ '[' loaded '!=' not-found ']'
    +++ _use_systemctl=1
    ++++ systemctl -p CanReload --value show squeezelite.service
    +++ '[' no = no ']'
    +++ '[' start = reload ']'
    +++ '[' 1 = 1 ']'
    +++ set +e
    +++ set +u
    +++ case "$argument" in
    +++ systemctl_redirect /etc/init.d/squeezelite start
    +++ local s
    +++ local rc
    +++ local prog=squeezelite
    +++ local command=start
    +++ case "$command" in
    +++ s='Starting squeezelite (via systemctl)'
    +++ service=squeezelite.service
    ++++ systemctl is-system-running
    +++ OUT=degraded
    +++ '[' degraded '!=' degraded ']'
    +++ '[' start = status ']'
    +++ log_daemon_msg 'Starting squeezelite (via systemctl)' squeezelite.service
    +++ '[' -z 'Starting squeezelite (via systemctl)' ']'
    +++ log_daemon_msg_pre 'Starting squeezelite (via systemctl)' squeezelite.service
    +++ log_use_fancy_output
    +++ TPUT=/usr/bin/tput
    +++ EXPR=/usr/bin/expr
    +++ '[' -t 1 ']'
    +++ '[' xxterm-256color '!=' x ']'
    +++ '[' xxterm-256color '!=' xdumb ']'
    +++ '[' -x /usr/bin/tput ']'
    +++ '[' -x /usr/bin/expr ']'
    +++ /usr/bin/tput hpa 60
    +++ /usr/bin/tput setaf 1
    +++ '[' -z ']'
    +++ FANCYTTY=1
    +++ case "$FANCYTTY" in
    +++ true
    +++ echo -n '[....] '
    [....] +++ '[' -z squeezelite.service ']'
    +++ echo -n 'Starting squeezelite (via systemctl): squeezelite.service'
    Starting squeezelite (via systemctl): squeezelite.service+++ log_daemon_msg_post 'Starting squeezelite (via systemctl)' squeezelite.service
    +++ :
    +++ /bin/systemctl --no-pager start squeezelite.service
    +++ rc=0
    +++ '[' start = status ']'
    +++ log_end_msg 0
    +++ '[' -z 0 ']'
    +++ local retval
    +++ retval=0
    +++ log_end_msg_pre 0
    +++ log_use_fancy_output
    +++ TPUT=/usr/bin/tput
    +++ EXPR=/usr/bin/expr
    +++ '[' -t 1 ']'
    +++ '[' xxterm-256color '!=' x ']'
    +++ '[' xxterm-256color '!=' xdumb ']'
    +++ '[' -x /usr/bin/tput ']'
    +++ '[' -x /usr/bin/expr ']'
    +++ /usr/bin/tput hpa 60
    +++ /usr/bin/tput setaf 1
    +++ '[' -z 1 ']'
    +++ true
    +++ case "$FANCYTTY" in
    +++ true
    ++++ /usr/bin/tput setaf 1
    +++ RED=''
    ++++ /usr/bin/tput setaf 2
    +++ GREEN=''
    ++++ /usr/bin/tput setaf 3
    +++ YELLOW=''
    ++++ /usr/bin/tput op
    +++ NORMAL=''
    +++ /usr/bin/tput civis
    +++ /usr/bin/tput sc
    +++ /usr/bin/tput hpa 0
    +++ '[' 0 -eq 0 ']'
    +++ /bin/echo -ne '[ ok '
    [ ok +++ /usr/bin/tput rc
    +++ /usr/bin/tput cnorm
    +++ log_use_fancy_output
    +++ TPUT=/usr/bin/tput
    +++ EXPR=/usr/bin/expr
    +++ '[' -t 1 ']'
    +++ '[' xxterm-256color '!=' x ']'
    +++ '[' xxterm-256color '!=' xdumb ']'
    +++ '[' -x /usr/bin/tput ']'
    +++ '[' -x /usr/bin/expr ']'
    +++ /usr/bin/tput hpa 60
    +++ /usr/bin/tput setaf 1
    +++ '[' -z 1 ']'
    +++ true
    +++ case "$FANCYTTY" in
    +++ true
    ++++ /usr/bin/tput setaf 1
    +++ RED=''
    ++++ /usr/bin/tput setaf 3
    +++ YELLOW=''
    ++++ /usr/bin/tput op
    +++ NORMAL=''
    +++ '[' 0 -eq 0 ']'
    +++ echo .
    .
    +++ log_end_msg_post 0
    +++ :
    +++ return 0
    +++ return 0
    +++ exit 0
    It looks to me like SL_NAME is being correctly picked up.
    Last edited by pantomnesia; 2021-06-17 at 04:13. Reason: NAME not PLAYER!

  4. #34
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,640
    Quote Originally Posted by pantomnesia View Post
    It looks to me like SL_PLAYER is being correctly picked up.
    I booted up a Pi and I think there is something else happening not just the name quoting - possible the need to reload init.d after edits.

    I can't do more until later today.

  5. #35
    Junior Member
    Join Date
    Nov 2020
    Posts
    19
    Quote Originally Posted by bpa View Post
    I booted up a Pi and I think there is something else happening not just the name quoting - possible the need to reload init.d after edits.
    Must admit, I was starting to think the problem might be elsewhere. I've done 'systemctl daemon-reload' and 'service logitechmediaserver restart' in my testing and it seems to make no difference. With just SL_NAME=Player in the parameter file, LMS recognises the player straight away, no restarts of LMS nor init.d reloads needed. So, no urgency bpa... in fact, if you want to forget it completely then that's OK with me too.

  6. #36
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,640
    Quote Originally Posted by pantomnesia View Post
    Must admit, I was starting to think the problem might be elsewhere. I've done 'systemctl daemon-reload' and 'service logitechmediaserver restart' in my testing and it seems to make no difference. With just SL_NAME=Player in the parameter file, LMS recognises the player straight away, no restarts of LMS nor init.d reloads needed. So, no urgency bpa... in fact, if you want to forget it completely then that's OK with me too.
    I spent a little bit of time but the problem is "elsewhere". I think the init.d script was created before systemctl was added as default. I'm not familiar with systemctl. systemctl says it is executing the init.d script but now squeezelite doesn't start. I'm not sure command line systemctl is using to start squeezelite is right.

    Need to spend time with systemctl.

    Part of output of trace of "status".

    Code:
    + /bin/systemctl --no-pager status squeezelite.service
    ● squeezelite.service - LSB: Lightweight headless Squeezebox emulator
       Loaded: loaded (/etc/init.d/squeezelite; generated)
       Active: active (exited) since Thu 2021-06-17 22:12:43 IST; 13h ago
         Docs: man:systemd-sysv-generator(8)
        Tasks: 0 (limit: 4915)
       CGroup: /system.slice/squeezelite.service
    
    Jun 17 22:12:43 pi4sys squeezelite[5965]: + DAEMON_ARGS= -n "The Player"
    Jun 17 22:12:43 pi4sys squeezelite[5965]: + [ -n  ]
    Jun 17 22:12:43 pi4sys squeezelite[5965]: + start-stop-daemon --start --quiet --pidfile /run/squeezelite.pid --exec /usr/bin/squeezelite --test
    Jun 17 22:12:43 pi4sys squeezelite[5965]: + start-stop-daemon --start --quiet --pidfile /run/squeezelite.pid --exec /usr/bin/squeezelite --background --make-pidfile -- -n "The Player"
    Jun 17 22:12:43 pi4sys squeezelite[5965]: + RET=0
    Jun 17 22:12:43 pi4sys squeezelite[5965]: + [ no != no ]
    Jun 17 22:12:43 pi4sys squeezelite[5965]: + exit 0
    Jun 17 22:12:43 pi4sys systemd[1]: Started LSB: Lightweight headless Squeezebox emulator.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •