Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian: Add a systemd service file for LMS #18

Merged
merged 3 commits into from
Feb 7, 2021

Commits on Feb 3, 2021

  1. Debian: Add systemd service unit

    This change adds a systemd service unit file to the Debian installation
    package.
    
    On a systemd enabled system, this service file will be used in place of
    the SysV init scripts that have traditionally used to start LMS. It
    offers better logging at LMS start up by eliminating use of the
    'squeezeboxserver_safe' script. Other behavioural differences are noted
    by way of comments in the unit file.
    
    On a "non-systemd" system, the existing SysV init scripts will be used.
    
    The method used is that published in the Debian systemd packaging wiki:
    https://wiki.debian.org/Teams/pkg-systemd/Packaging
    
    The present packaging uses debhelper compatibility level 9, and that
    remains unchanged. The required amendments are described in the wiki.
    
    debian/control:
    + Added Build-Depends on dh-systemd (>= 1.5)
    + Also added '${misc:Depends}' and '${misc:Pre-Depends}'. This is not
      referenced in the wiki, but the "systemd helper" may populate these
      fields.
    
    debian/rules:
    + 'dh' is now invoked '--with systemd'
    
    debian/logitechmediaserver.service
    + This is the systemd unit file.
    mw9 committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    7bf80cf View commit details
    Browse the repository at this point in the history
  2. Debian: Add systemd service unit - support older systems without 'ini…

    …t-system-helpers'
    
    The debhelper systemd tools may automatically add a dependency on
    package 'init-system-helpers' to the LMS package. (debhelper <= 11 will
    do this).
    
    This dependency cannot/may not be met on older Debian based systems
    (Debian version <= 7), and in consequence the package would fail to
    install on these systems. These systems will not be using 'systemd'.
    
    There continues to be a significant element of the user base that runs
    these older systems, and they need to be accommodated.
    
    This change does that by simply removing the dependency from the
    generated debian control file, should it be there.
    
    The LMS package will be successfully installed and started regardless of
    whether the 'init-system-helpers' package is available. The user of a
    'deficient' system will see the following message, or similar, during
    installation:
    
    /var/lib/dpkg/info/logitechmediaserver.postinst: 61:
       /var/lib/dpkg/info/logitechmediaserver.postinst: deb-systemd-helper: not found
    
    Nevertheless, LMS will have been installed, and the traditional SysV
    init script will be in place.
    
    Package 'init-system-helpers' has been an 'essential' package since
    Debian version 9, so modern systems will not be impacted by removing the
    dependency.
    mw9 committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    3cdae36 View commit details
    Browse the repository at this point in the history
  3. Debian: Add systemd service unit - add explanatory comments to LMS de…

    …fault file
    
    This change adds some explanatory comments to the LMS defaults file
    '/etc/defaults/logitechmediaserver'.
    
    In particular, to highlight that the 'SLIMUSER' option is not effective
    on a systemd based system.
    mw9 committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    6922f53 View commit details
    Browse the repository at this point in the history