From 15c376ad57629dad16f1120dbf4c080f7de48475 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Sat, 22 Apr 2017 18:51:28 +0100 Subject: [PATCH] Update System V and System D installers to define user, group and runtime directory as necessary --- Makefile.am | 6 ++++++ 1 file changed, 6 insertions(+) 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