aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4ae1d4e7..050fb07a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,7 @@ AC_ARG_ENABLE([openssl_asm], [AS_HELP_STRING([--disable-openssl-asm], [Don't l
AC_ARG_ENABLE([ca_tools], [AS_HELP_STRING([--disable-ca-tools], [Don't build any of the CA tools])], [], [enable_ca_tools=yes])
AC_ARG_ENABLE([rpki_rtr], [AS_HELP_STRING([--disable-rpki-rtr], [Don't build the rpki-rtr code])], [], [enable_rpki_rtr=yes])
AC_ARG_ENABLE([target_installation], [AS_HELP_STRING([--disable-target-installation], [Don't perform final target installation])],[], [enable_target_installation=yes])
+AC_ARG_ENABLE([daemon_mode], [AS_HELP_STRING([--enable-daemon-mode=user[:group]], [Run the web portal as a separate process])],[],[enable_daemon_mode=no])
AC_ARG_VAR([RCYNIC_DIR], [Where to put output files from rcynic and rtr-origin; also controls jail location for --enable-rcynic-jail])
@@ -629,6 +630,18 @@ then
# There is no standard name for this tool, so check for it.
AC_PATH_PROGS(DJANGO_ADMIN, [django-admin django-admin.py])
+ if test "$enable_daemon_mode" != no
+ then
+ save_IFS="$IFS"
+ IFS=':' read user group <<_EOF
+$enable_daemon_mode
+_EOF
+ IFS="$save_IFS"
+ AC_SUBST(WSGI_DAEMON_PROCESS, "WSGIDaemonMode rpkigui user=$user ${group:+group=}${group} display-name=%{GROUP}")
+ AC_SUBST(WSGI_PROCESS_GROUP, "WSGIProcessGroup rpkigui")
+ AC_MSG_RESULT([running mod_wsgi in daemon mode with user "$user" and group "${group:-default}"])
+ fi
+
AC_CONFIG_FILES([rpkid/Makefile rpkid/tests/Makefile rpkid/portal-gui/Makefile])
fi