]> git.ipfire.org Git - thirdparty/nqptp.git/commitdiff
Add a flag to selectively enable includion of the startup script.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Wed, 28 Jul 2021 15:02:37 +0000 (16:02 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Wed, 28 Jul 2021 15:02:37 +0000 (16:02 +0100)
Makefile.am
README.md
configure.ac

index 906e01ae1078bb726ae8bbf142df185f5e11ea01..cb907f4494a5b035d611f00b27a27e76044d2e53 100644 (file)
@@ -19,8 +19,10 @@ endif
 
 install-exec-hook:
 if BUILD_FOR_LINUX
+if INSTALL_SYSTEMD_STARTUP
        [ -e $(DESTDIR)/lib/systemd/system ] || mkdir -p $(DESTDIR)/lib/systemd/system
        cp nqptp.service $(DESTDIR)/lib/systemd/system
+endif
 endif
  # no installer for FreeBSD yet
  
index a9e3c74128a17e4615ba02b1793a533f9a472673..2bf1b74e6921be24d7b631639e272d8ef2cd856e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -45,11 +45,11 @@ Note that you will need superuser privileges to install, enable and start the da
 $ git clone https://github.com/mikebrady/nqptp.git
 $ cd nqptp
 $ autoreconf -fi
-$ ./configure
+$ ./configure --with-systemd-startup
 $ make
 # make install
 ```
-The `make install` installs a `systemd` startup script. You should enable it and start it in the normal way:
+The `make install` installs a `systemd` startup script as requested. You should enable it and start it in the normal way:
 
 ```
 # systemctl enable nqptp
index a4a97b68ba61a09af7a7d582d3eb1250c0a042b2..92e597e0454245c466da966513d9729cb38d4001 100644 (file)
@@ -39,6 +39,12 @@ if test -n "$GIT" && test -e ".git/index" ; then
 fi
 AM_CONDITIONAL([USE_GIT_VERSION], [test -n "$GIT" && test -e ".git/index" ])
 
+
+# Check to see if we should include the systemd stuff to define it as a service
+AC_ARG_WITH([systemd-startup],[AS_HELP_STRING([--with-systemd-startup],[install a systemd startup script during a make install])])
+AM_CONDITIONAL([INSTALL_SYSTEMD_STARTUP], [test "x$with_systemd_startup" = "xyes"])
+
+
 AC_CONFIG_SRCDIR([nqptp.c])
 AC_CONFIG_HEADERS([config.h])