From: Mike Brady Date: Sat, 22 Apr 2017 17:51:28 +0000 (+0100) Subject: Update System V and System D installers to define user, group and runtime directory... X-Git-Tag: 3.1d16~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15c376ad57629dad16f1120dbf4c080f7de48475;p=thirdparty%2Fshairport-sync.git Update System V and System D installers to define user, group and runtime directory as necessary --- diff --git a/Makefile.am b/Makefile.am index 908b34cc..1727ba85 100644 --- a/Makefile.am +++ b/Makefile.am @@ -75,10 +75,16 @@ if INSTALL_CONFIG_FILES [ -f $(DESTDIR)$(sysconfdir)/shairport-sync.conf ] || cp scripts/shairport-sync.conf $(DESTDIR)$(sysconfdir)/shairport-sync.conf endif if INSTALL_SYSTEMV + getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null + getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null + [ -e /var/run/shairport-sync ] || mkdir -p /var/run/shairport-sync + chown shairport-sync:shairport-sync /var/run/shairport-sync [ -e $(DESTDIR)$(sysconfdir)/init.d ] || mkdir -p $(DESTDIR)$(sysconfdir)/init.d [ -f $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || cp scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d/ endif if INSTALL_SYSTEMD + getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null + getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null [ -e $(DESTDIR)$(systemdsystemunitdir) ] || mkdir -p $(DESTDIR)$(systemdsystemunitdir) [ -f $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || cp scripts/shairport-sync.service $(DESTDIR)$(systemdsystemunitdir) endif