updated installer to use the new command line and configuration options
Costa Tsaousis committed
Jul 23, 2016 at 22:39 UTC
540b0a4d92bb51bf7541a17716a534d7d1df460c
1 file changed
+14
-14
netdata-installer.sh
+14
-14
@@ -561,7 +561,16 @@ NETDATA_DEBUG="$( config_option "debug flags" ${defdebug} )"
561
562
# port
563
defport=19999
564
-NETDATA_PORT="$( config_option "port" ${defport} )"
564
+NETDATA_PORT="$( config_option "default port" ${defport} )"
565
+NETDATA_PORT2="$( config_option "port" ${defport} )"
566
+
567
+if [ "${NETDATA_PORT}" != "${NETDATA_PORT2}" ]
568
+then
569
+ if [ "${NETDATA_PORT2}" != "${defport}" ]
570
+ then
571
+ NETDATA_PORT="${NETDATA_PORT2}"
572
+ fi
573
+fi
574
575
# directories
576
NETDATA_LIB_DIR="$( config_option "lib directory" "${NETDATA_PREFIX}/var/lib/netdata" )"
@@ -569,7 +578,6 @@ NETDATA_CACHE_DIR="$( config_option "cache directory" "${NETDATA_PREFIX}/var/cac
578
NETDATA_WEB_DIR="$( config_option "web files directory" "${NETDATA_PREFIX}/usr/share/netdata/web" )"
579
NETDATA_LOG_DIR="$( config_option "log directory" "${NETDATA_PREFIX}/var/log/netdata" )"
580
NETDATA_CONF_DIR="$( config_option "config directory" "${NETDATA_PREFIX}/etc/netdata" )"
572
-NETDATA_BIND="$( config_option "bind socket to IP" "*" )"
581
NETDATA_RUN_DIR="${NETDATA_PREFIX}/var/run"
582
583
@@ -1007,27 +1015,19 @@ chmod 750 netdata-uninstaller.sh
1015
1016
# -----------------------------------------------------------------------------
1017
1010
-if [ "${NETDATA_BIND}" = "*" ]
1011
- then
1012
- access="localhost"
1013
-else
1014
- access="${NETDATA_BIND}"
1015
-fi
1016
-
1018
cat <<-END
1019
1020
1021
-------------------------------------------------------------------------------
1022
1022
- OK. NetData is installed and it is running (listening to ${NETDATA_BIND}:${NETDATA_PORT}).
1023
+ OK. NetData is installed and it is running.
1024
1025
-------------------------------------------------------------------------------
1026
1026
- INFO: Command line options changed. -pidfile, -nd and -ch are deprecated.
1027
- If you use custom startup scripts, please run netdata -h to see the
1028
- corresponding options and update your scripts.
1027
+ By default netdata listens on all IPs on port ${NETDATA_PORT},
1028
+ so you can access it with:
1029
1030
- Hit http://${access}:${NETDATA_PORT}/ from your browser.
1030
+ http://this.machine.ip:${NETDATA_PORT}/
1031
1032
To stop netdata, just kill it, with:
1033