With my Fedora 16 system (64bit), I found that all I needed to do was:

# ln -s /usr/lib/perl5/vendor_perl/Slim
/usr/share/perl5/vendor_perl/Slim

But I'm starting lms using some custom systemd unit files that I cobbled
together.  If you haven't given up completely yet, this is what I'm
doing so that you can use the Fedora-centric systemd to directly control
lms:

lms-fedora-fix.sh:

Code:
--------------------
    
  #/bin/bash
  # Script to get LMS 7.8 working on Fedora 16 using unit files..
  
  # Get the stock init file out of the way..
  mv /etc/rc.d/init.d/squeezeboxserver /etc/rc.d/init.d/not.squeezeboxserver
  
  # Fix up vendor perl
  ln -s /usr/lib/perl5/vendor_perl/Slim /usr/share/perl5/vendor_perl/Slim
  
  # Create our tmpfiles.d conf file...this creates a location for the pid file..
  echo 'D /var/run/logitechmediaserver 1710 squeezeboxserver squeezeboxserver' 
>/etc/tmpfiles.d/logitechmediaserver.conf
  rm -R -f /var/run/logitechmediaserver >/dev/null 2>&1
  systemd-tmpfiles --create /etc/tmpfiles.d/logitechmediaserver.conf
  
  # Create the standard systemctl unit file:
  INSTPATH="/lib/systemd/system"
  INSTNAME='logitechmediaserver'
  
  cat >"${INSTPATH}/${INSTNAME}.service" <<SYSD1;
  [Unit]
  Description=Logitech Media Server
  After=local-fs.target network.target
  
  [Service]
  Type=simple
  User=squeezeboxserver
  Group=squeezeboxserver
  ExecStartPre=/bin/systemd-tmpfiles --create 
/etc/tmpfiles.d/logitechmediaserver.conf
  ExecStart=/usr/libexec/squeezeboxserver 
--pidfile=/var/run/logitechmediaserver/logitechmediaserver.pid 
--cachedir=/var/lib/squeezeboxserver/cache 
--prefsdir=/var/lib/squeezeboxserver/prefs --logdir=/var/log/squeezeboxserver 
--charset=utf8
  PIDFile=/var/run/logitechmediaserver/logitechmediaserver.pid
  RestartSec=5
  Restart=on-failure
  
  [Install]
  WantedBy=multi-user.target
  #Uncomment to make an alias for the service..
  #Alias=lms
  SYSD1
  
  # Create the debugging version
  INSTNAME='logitechmediaserver_debug'
  cat >"${INSTPATH}/${INSTNAME}.service" <<SYSD2;
  [Unit]
  Description=Logitech Media Server with startup debugging
  After=local-fs.target network.target
  
  [Service]
  Type=simple
  User=squeezeboxserver
  Group=squeezeboxserver
  ExecStartPre=/bin/systemd-tmpfiles --create 
/etc/tmpfiles.d/logitechmediaserver.conf
  ExecStart=/usr/libexec/squeezeboxserver 
--pidfile=/var/run/logitechmediaserver/logitechmediaserver.pid 
--cachedir=/var/lib/squeezeboxserver/cache 
--prefsdir=/var/lib/squeezeboxserver/prefs --logdir=/var/log/squeezeboxserver 
--charset=utf8  --diag --d_startup 
>/var/log/squeezeboxserver/squeezeboxserver_debug.log 2>&1
  PIDFile=/var/run/logitechmediaserver/logitechmediaserver.pid
  RestartSec=5
  Restart=on-failure
  
  [Install]
  WantedBy=multi-user.target
  #Uncomment to make an alias for the service..
  #Alias=lms_debug
  SYSD2
  
  # Enable the new unit files..
  systemctl --system daemon-reload
  systemctl enable logitechmediaserver.service
  systemctl disable logitechmediaserver_debug.service
  systemctl --system daemon-reload
  
  # Start the debugging version:
  
  systemctl start logitechmediaserver_debug.service
  
  # Watch the system log for messages:
  
  tail -f -n 50 /var/log/messages
  
--------------------

There after, you can control the service with:

start:
# systemctl start logitechmediaserver.service

status:
# systemctl status logitechmediaserver.service


stop:
# systemctl stop logitechmediaserver.service

..and you can start a debugging version with:


# systemctl start logitechmediaserver_debug.service

..which will put startup error messages into the system log..which you
can view via:
# tail -f -n 50 /var/log/messages


------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=95347

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to