diff --git a/configure b/configure index b1b8b31..e5a6991 100755 --- a/configure +++ b/configure @@ -5555,7 +5555,7 @@ $as_echo "${python_libspec}" >&6; } CPPFLAGS='-DLOCALSTATEDIR=\"$(localstatedir)\" -DPKGDATADIR=\"$(pkgdatadir)\" -DPKGSYSCONFDIR=\"$(sysconfdir)/capisuite\" -DPKGLIBDIR=\"$(pkglibdir)\" $(python_includespec)' -ac_config_files="$ac_config_files Makefile src/Makefile src/backend/Makefile src/modules/Makefile src/application/Makefile src/capisuite-py/Makefile scripts/Makefile scripts/waves/Makefile docs/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile src/backend/Makefile src/modules/Makefile src/application/Makefile src/capisuite-py/Makefile scripts/Makefile scripts/waves/Makefile docs/Makefile scripts/capisuite.service" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -6296,6 +6296,7 @@ do "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "scripts/waves/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/waves/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "scripts/capisuite.service") CONFIG_FILES="$CONFIG_FILES scripts/capisuite.service" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/configure.ac b/configure.ac index 560516b..d397fee 100644 --- a/configure.ac +++ b/configure.ac @@ -29,5 +29,5 @@ AM_PATH_PYTHON([2.7]) PGAC_CHECK_PYTHON_EMBED_SETUP CPPFLAGS='-DLOCALSTATEDIR=\"$(localstatedir)\" -DPKGDATADIR=\"$(pkgdatadir)\" -DPKGSYSCONFDIR=\"$(sysconfdir)/capisuite\" -DPKGLIBDIR=\"$(pkglibdir)\" $(python_includespec)' -AC_CONFIG_FILES([Makefile src/Makefile src/backend/Makefile src/modules/Makefile src/application/Makefile src/capisuite-py/Makefile scripts/Makefile scripts/waves/Makefile docs/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile src/backend/Makefile src/modules/Makefile src/application/Makefile src/capisuite-py/Makefile scripts/Makefile scripts/waves/Makefile docs/Makefile scripts/capisuite.service]) AC_OUTPUT diff --git a/scripts/capisuite.service.in b/scripts/capisuite.service.in new file mode 100644 index 0000000..70b3466 --- /dev/null +++ b/scripts/capisuite.service.in @@ -0,0 +1,18 @@ +[Unit] +Description=capi suite (answering machine) + +# In real life, this unit needs to be started after the capi implementation has started, but this is wildly different +# between installations. +# In my case, it is: +# After=network.target mISDNcapid.service +# See https://gist.github.com/larsimmisch/62bb9affe6032eeb7a687f6870c10416 for an example of the mISDNcapid service definition + +After=network.target + +[Service] +ExecStart=@sbindir@/capisuite +Restart=always + +[Install] +WantedBy=multi-user.target +