]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Update System V and System D installers to define user, group and runtime directory...
authorMike Brady <mikebrady@eircom.net>
Sat, 22 Apr 2017 17:51:28 +0000 (18:51 +0100)
committerMike Brady <mikebrady@eircom.net>
Sat, 22 Apr 2017 17:51:28 +0000 (18:51 +0100)
Makefile.am

index 908b34cc3868b351a808a51b089f766819c8165d..1727ba8591e28e8a6e7a5841c07ef56abb016b80 100644 (file)
@@ -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