20150129 config-lms-git-service.sh  -- README

Code:
--------------------
    
  Install script for running LMS git code as a service: 
config-lms-git-service.sh
  
  
==================================================================================================
  What the script does:
  
==================================================================================================
  The script clones the public/7.9 branch of the 
https://github.com/Logitech/slimserver.git
  repo to /usr/local/share/lms/server
  
  The script then creates a service so that a fully functional 
logitechmediaserver/squeezeboxserver
  daemon runs on the local machine.
  
  
==================================================================================================
  Tested on:
  
==================================================================================================
  Ubuntu server 14.04LTS
  Fedora 21
  
  
==================================================================================================
  Requirements:
  
==================================================================================================
  
  The git utility must be installed.  In my tests with Ubuntu 14.04 & Fedora 
21, no other software,
  CPAN modules, etc. need to be installed for a fully functioning LMS service.  
You will, however,
  need to open the appropriate ports (UDP 3483, TCP 3483,9000,9090) in your 
firewall to allow access
  to the service over your network.
  
  
==================================================================================================
  Install Details:
  
==================================================================================================
  The script initially presents a prompt, allowing the user to bail with a 
ctrl-c.  If you continue,
  the script:
  
        Clones the public/7.9 branch from 
https://github.com/Logitech/slimserver.git to
        /usr/local/share/lms/server
  
        Creates a 'lms' system account (i.e. w/o login privileges) and adds 
that user to the 'audio'
        group (for squeezelite) if it exists.
  
        Creates a /etc/default/lms | /etc/sysconfig/lms env vars file where 
startup options are stored.
  
        Creates a /var/lib/lms_data/public/7.9 data folder to store the LMS 
databases, user installed
        plug-ins, etc.
  
        Symlinks the /var/lib/lms_data/public/7.9 folder to /var/lib/lms
  
        Creates a /var/log/lms_log/public/7.9 folder to store the server.log, 
scanner.log, etc files.
  
        Symlinks the /var/log/lms_log/public/7.9 folder to /var/log/lms
  
        Creates a /var/lib/lms_data/Plugins folder.
  
        Symlinks the /var/lib/lms_data/Plugins folder to 
/usr/local/share/lms/server/Plugins.
  
        Creates a service control script:
  
                On Fedora/Redhat/CentOS or other distros using 
systemd/systemctl, creates a
                /usr/lib/systemd/system/lms.service unit file.
  
                On Ubuntu or other distros using upstart/initctl, creates a
                /etc/init/lms.conf service file.
  
                On other distros, creates a sysv init:
                /etc/init.d/lms | /etc/rc.d/init.d/lms service script.
  
        Disables (prevents from auto starting) any stock
                /etc/init.d/logitechmediaserver | 
/etc/rc.d/init.d/squeezeboxserver
                service scripts.  (These scripts remain installed, however, and 
can still be
                started manually or re-enabled.)
  
        Creates a /usr/local/sbin/lms-debug.sh startup debugging script.
  
        Creates a /usr/local/sbin/lms-update.sh script for updating the local 
repo
        from https://github.com/Logitech/slimserver.git
  
        Creates a /usr/local/sbin/lms-switch-branch.sh script for switching the 
branch of the
        local repo.  The script keeps the data for the various branches 
separate.
  
  
  
==================================================================================================
  How to:
  
==================================================================================================
  
        Install the lms git code as a service:
                # sudo ./config-lms-git-service.sh
  
        Remove / uninstall the lms git code as a service:
                # sudo ./config-lms-git-service.sh --remove
  
        Remove / uninstall the lms git code as a service, but
        keep the local repo and data:
                # sudo ./config-lms-git-service.sh --remove --keep
  
        Disable the lms service:
                # sudo ./config-lms-git-service.sh --disable
  
        Enable the lms service:
                # sudo ./config-lms-git-service.sh --disable
  
        Update the local repo from https://github.com/Logitech/slimserver.git:
                # sudo /usr/local/sbin/lms-update.sh
  
        List the available branches in the local repo:
                # sudo /usr/local/sbin/lms-swich-branch.sh
  
        Switch from the public/7.9 branch to the 7.8 branch:
                # sudo /usr/local/sbin/lms-switch-branch.sh 'public/7.8'
  
        Debug / troubleshoot startup problems:
                # sudo /usr/local/sbin/lms-debug.sh
  
  
==================================================================================================
  Other options:
  
==================================================================================================
  
        If you don't intend to switch from the public/7.9 branch to any other,
        you can install via:
  
                # sudo ./config-lms-git-service.sh --lite
  
        ..which clones only the latest revisions from the remote git repo.
        This will result in a much smaller disk-usage footprint for the local
        repo.
  
        If you would rather use a traditional sysv init script than an upstart 
or
        systemd service, install via:
  
                # sudo ./config-lms-git-service.sh --sysv
  
        Note that the sysv init script is written for a Ubuntu/debian LSB init
        system and may need to be modified to work with Fedora/Redhat/CentOS.
        On those distros, it's probably best to stick with the systemd service
        unit file.
  
--------------------


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

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to