From 935160180aecb4c95caf7df0649b6d258c811488 Mon Sep 17 00:00:00 2001 From: dan carter Date: Wed, 23 Dec 2015 12:55:25 +1300 Subject: [PATCH] User $PREFIX in the init file --- .gitignore | 1 + configure.ac | 1 + scripts/{shairport-sync => shairport-sync.in} | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) rename scripts/{shairport-sync => shairport-sync.in} (99%) diff --git a/.gitignore b/.gitignore index 261468a6..cdbef556 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ stamp-h1 man/Makefile man/Makefile.in scripts/shairport-sync.service +scripts/shairport-sync \ No newline at end of file diff --git a/configure.ac b/configure.ac index ba31af0d..75e4db9e 100644 --- a/configure.ac +++ b/configure.ac @@ -256,4 +256,5 @@ AC_FUNC_REALLOC AC_CHECK_FUNCS([atexit clock_gettime gethostname inet_ntoa memchr memmove memset mkfifo pow select socket stpcpy strcasecmp strchr strdup strerror strstr strtol strtoul]) AC_CONFIG_FILES([Makefile man/Makefile scripts/shairport-sync.service]) +AC_CONFIG_FILES([scripts/shairport-sync],[chmod +x scripts/shairport-sync]) AC_OUTPUT diff --git a/scripts/shairport-sync b/scripts/shairport-sync.in similarity index 99% rename from scripts/shairport-sync rename to scripts/shairport-sync.in index d1175504..7e0dd767 100755 --- a/scripts/shairport-sync +++ b/scripts/shairport-sync.in @@ -17,7 +17,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="AirPlay Synchronous Audio Service" NAME=shairport-sync -DAEMON=/usr/local/bin/$NAME +DAEMON=@prefix@/bin/$NAME # We don't use the DAEMON_ARGS variable here because some of the identifiers may have spaces in them, and so are # impossible to pass as arguments. -- 2.47.3