* Changed config and install options for Restconf
* clixon_restconf daemon is installed in /usr/local/sbin (as clixon_backend), instead of /www-data
* `configure --with-wwwdir=<dir>` remains but only applies to fcgi socket and log
* New option `CLICON_RESTCONF_INSTALL_DIR` is set to where clixon_restconf is installed, with default `/usr/local/sbin/`
* Restconf drop privileges user is defined by `CLICON_RESTCONF_USER`
* `configure --with-wwwuser=<user>` is removed
* clixon_restconf drop of privileges is defined by `CLICON_RESTCONF_PRIVILEGES` option
* New clixon-restconf@2020-05-20.yang revision
* Added: restconf `log-destination`
This commit is contained in:
parent
c3e26b004c
commit
c20c672d83
32 changed files with 410 additions and 221 deletions
22
configure.ac
22
configure.ac
|
|
@ -98,9 +98,7 @@ AC_SUBST(LINKAGE)
|
|||
AC_SUBST(with_restconf) # Set to native or fcgi -> compile apps/restconf
|
||||
AC_SUBST(with_libxml2)
|
||||
AC_SUBST(enable_optyangs)
|
||||
# Web user default (ie what RESTCONF daemon runs as).
|
||||
AC_SUBST(wwwuser,www-data)
|
||||
# Home dir for web user
|
||||
# Home dir for web user, such as nginx fcgi sockets
|
||||
AC_SUBST(wwwdir,/www-data)
|
||||
|
||||
#
|
||||
|
|
@ -216,6 +214,7 @@ if test "x${with_restconf}" == xfcgi; then
|
|||
# Lives in libfcgi-dev
|
||||
AC_CHECK_LIB(fcgi, FCGX_Init,, AC_MSG_ERROR([libfcgi-dev missing]))
|
||||
AC_DEFINE(WITH_RESTCONF_FCGI, 1, [Use fcgi restconf mode]) # For c-code that cant use strings
|
||||
AC_DEFINE_UNQUOTED(WWWDIR, "$wwwdir", [WWW dir for fcgi stuff / nginx])
|
||||
elif test "x${with_restconf}" == xnative; then
|
||||
AC_CHECK_LIB(ssl, OPENSSL_init_ssl ,, AC_MSG_ERROR([libssl missing]))
|
||||
AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, , AC_MSG_ERROR([libcrypto missing]))
|
||||
|
|
@ -248,23 +247,6 @@ AC_ARG_WITH([restconf],
|
|||
AC_ARG_WITH([restconf],
|
||||
AS_HELP_STRING([--without-restconf],[Disable restconf altogether]))
|
||||
|
||||
# Common actions for all restconf packages
|
||||
if test "x${with_restconf}" != "x"; then
|
||||
# Web user default (ie what RESTCONF daemon runs as). Default: www-data
|
||||
# Should this be a runtime option?
|
||||
AC_ARG_WITH([wwwuser],
|
||||
[AS_HELP_STRING([--with-wwwuser=<user>],[Set www user different from www-data])])
|
||||
if test "${with_wwwuser}"; then
|
||||
wwwuser=${with_wwwuser}
|
||||
fi
|
||||
AC_MSG_RESULT(www user is $wwwuser)
|
||||
AC_DEFINE_UNQUOTED(WWWUSER, "$wwwuser", [WWW user for restconf daemon])
|
||||
AC_DEFINE_UNQUOTED(WWWDIR, "$wwwdir", [WWW dir for restconf daemon])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(WWWUSER, "", [WWW user for restconf daemon])
|
||||
AC_DEFINE_UNQUOTED(WWWDIR, "", [WWW dir for restconf daemon])
|
||||
fi
|
||||
|
||||
# Set default config file location
|
||||
CLIXON_DEFAULT_CONFIG=/usr/local/etc/clixon.xml
|
||||
AC_ARG_WITH([configfile],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue