Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Senior Member Mnyb's Avatar
    Join Date
    Feb 2006
    Location
    Vństerňs Sweden
    Posts
    13,180
    I'm on a redhat like OS , CC4.2 I don't know that much linux as you guys , but I can test your modifications if you want .

    On my system the restart command has been broken for several years now , this discussion seems related. using restart does not work, stop works but gives an error messsage another related issue is that the automatic start after an install is also broken.
    --------------------------------------------------------------------
    Main hifi: Touch + CIA PS +MeridianG68J MeridianHD621 MeridianG98DH 2 x MeridianDSP5200 MeridianDSP5200HC 2 xMeridianDSP3100 +Rel Stadium 3 sub.
    Bedroom/Office: Boom
    Kitchen: Touch + powered Fostex PM0.4
    Misc use: Radio (with battery)
    iPad1 with iPengHD & SqueezePad
    (in storage SB3, reciever ,controller )
    server HP proliant micro server N36L with ClearOS Linux

    http://people.xiph.org/~xiphmont/demo/neil-young.html

  2. #12
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,346
    I found that I had a difficult time getting the latest LMS 7.7.1 nightly to work with Fedora 15.

    One issue was that I had to do a manual cpan install of CGI::Cookie in order for the LMS code to run.

    The other issue was that LMS's /etc/init.d service script doesn't seem to play well with Fedora's new service control system, i.e. systemd.

    I went ahead and disabled and deleted the service script:

    Code:
    # rm /etc/sysconfig/squeezeboxserver
    # chkconfig squeezeboxserver off
    # chkconfig --del squeezeboxserver
    I then created created a 'lms' user & group:
    Code:
    # useradd --no-create-home --user-group --shell /bin/false 'lms'
    ..and then created a new systemd unit for the service..

    /lib/systemd/system/lms.service:
    Code:
    [Unit]
    Description=Logitech Media Server Daemon
    After=local-fs.target network.target
    
    [Service]
    
    ExecStart=/usr/share/lms/server/slimserver.pl --daemon --pidfile=/run/lms.pid --user=lms --group=lms --prefsdir=/var/lib/lms/prefs --logdir=/var/log/lms --cachedir=/var/lib/lms/cache --charset=utf8
    
    Type=simple
    
    PIDFile=/run/lms.pid
    
    RestartSec=5
    
    Restart=on-failure
    
    
    [Install]
    WantedBy=multi-user.target
    Alias=logitechmediaserver
    That unit file works for running the LMS svn code. It could be modified so that it ran the code as it's laid out by the rpm installer.

    Finally, I enabled and started the new service:
    Code:
    # systemctl enable lms.service
    # systemctl start lms.service
    # systemctl status lms.service
    lms.service - Logitech Media Server Daemon
    	  Loaded: loaded (/lib/systemd/system/lms.service)
    	  Active: active (running) since Tue, 08 Nov 2011 22:24:23 -0700; 24min ago
    	Main PID: 2654 (slimserver.pl)
    	  CGroup: name=systemd:/system/lms.service
    		  ├ 2654 /usr/bin/perl /usr/share/lms/server/slimserver.pl --daemon --pidfile=/run/lms.pid --user=lms --group=lms --prefsdir=/var/lib/lms/prefs --logdir=/var/log/...
    Running LMS this way (via a systemd service unit file) on Fedora 15 (and F16 too, I suspect) solves the problem described at that head of this thread. There is no problem controlling the service after a "internal" service restart.

  3. #13
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,346
    One minor problem with the above method: slimserver.pl creates the cache dir and others with root ownership rather than using the account:group passed on the command line. This will cause the service to repeatedly fail.

    The following corrects this, but is a kludge:

    /lib/systemd/system/lms.service:
    Code:
    [Unit]
    Description=Logitech Media Server Daemon
    After=local-fs.target network.target
    
    [Service]
    ExecStartPre=/bin/chown -R lms:lms /var/lib/lms ; /bin/chown -R lms:lms /var/log/lms
    
    ExecStart=/usr/share/lms/server/slimserver.pl --daemon --pidfile=/run/lms.pid --user=lms --group=lms --prefsdir=/var/lib/lms/prefs --logdir=/var/log/lms --cachedir=/var/lib/lms/cache --charset=utf8
    
    Type=simple
    
    PIDFile=/run/lms.pid
    
    RestartSec=5
    
    Restart=on-failure
    
    
    [Install]
    WantedBy=multi-user.target
    Alias=logitechmediaserver
    Last edited by gharris999; 2011-11-09 at 01:08.

  4. #14
    Senior Member
    Join Date
    Feb 2007
    Location
    Vancouver, BC
    Posts
    121
    Quote Originally Posted by gharris999 View Post
    I found that I had a difficult time getting the latest LMS 7.7.1 nightly to work with Fedora 15.
    ..snip..
    Running LMS this way (via a systemd service unit file) on Fedora 15 (and F16 too, I suspect) solves the problem described at that head of this thread. There is no problem controlling the service after a "internal" service restart.
    Yes, you might well be right. I'm still on Fedora 12.

  5. #15
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,346
    I'm going to guess that there are more squeezeboxserver users on CentOS than there are on Fedora. For that reason, I would think that a move to systemd units for the service will be a few years down the road. @quietdragon: I'm not at all suggesting that my unit example ought to supersede the work you're doing solving this bug. I was presenting it more as a curiosity.

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
  •