Skip to content

Commit

Permalink
also configure the director port
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Nov 19, 2018
1 parent a27ff4d commit b896692
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions regress/scripts/setup
Expand Up @@ -104,4 +104,6 @@ check_exit_code
make -C build-webui install
check_exit_code

echo "webui can be started with 'php -S 127.0.0.1:9100 -t ../webui/public/'"

exit 0
11 changes: 10 additions & 1 deletion webui/CMakeLists.txt
Expand Up @@ -29,7 +29,15 @@ INCLUDE(BareosSetVariableDefaults)

find_program(apxs APXS)


set (dirport ${baseport})
MATH(EXPR webuiport "${baseport} + 3")

set(confdir "${sysconfdir}/${CMAKE_PROJECT_NAME}")
# upcase variables for CONFIGURE_FILE
set(SYSCONFDIR "${sysconfdir}")
set(CONFDIR "${confdir}")


MESSAGE(" Install system config files: ${sysconfdir} ")
MESSAGE(" Install Bareos config dir: ${confdir} ")
Expand All @@ -47,9 +55,10 @@ ELSE()
SET(HTTPD_CONF ${sysconfdir}/httpd/conf.d)
ENDIF()


CONFIGURE_FILE(module/Application/language/Makefile.in module/Application/language/Makefile @ONLY)
CONFIGURE_FILE(public/js/locale/Makefile.in public/js/locale/Makefile @ONLY)
CONFIGURE_FILE(config/autoload/global.php.in config/autoload/global.php @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config/autoload/global.php.in ${CMAKE_CURRENT_SOURCE_DIR}/config/autoload/global.php @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/install/directors.ini.in ${CMAKE_CURRENT_SOURCE_DIR}/install/directors.ini @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/install/configuration.ini.in ${CMAKE_CURRENT_SOURCE_DIR}/install/configuration.ini @ONLY)

Expand Down
2 changes: 1 addition & 1 deletion webui/config/autoload/global.php.in
Expand Up @@ -139,7 +139,7 @@ function read_directors_ini($directors, $directors_ini)
$arr[key($directors)]['port'] = $instance['dirport'];
}
else {
$arr[key($directors)]['port'] = 9101;
$arr[key($directors)]['port'] = @dirport@;
}

if(array_key_exists('tls_verify_peer', $instance) && isset($instance['tls_verify_peer'])) {
Expand Down
6 changes: 3 additions & 3 deletions webui/install/directors.ini.in
Expand Up @@ -15,8 +15,8 @@ enabled = "yes"
; Fill in the IP-Address or FQDN of you director.
diraddress = "localhost"

; Default value is 9101
dirport = 9101
; Default value is @dirport@
dirport = @dirport@

; Set catalog to explicit value if you have multiple catalogs
;catalog = "MyCatalog"
Expand Down Expand Up @@ -68,7 +68,7 @@ client_requires_tls = false
[another-host-dir]
enabled = "no"
diraddress = "192.168.120.1"
dirport = 9101
dirport = @dirport@
;catalog = "MyCatalog"
;tls_verify_peer = false
;server_can_do_tls = false
Expand Down

0 comments on commit b896692

Please sign in to comment.