Rename --install option for kickstart.sh (#12798)

* replace --install flag with --install-prefix and update documentation

* fix

* minor fix
This commit is contained in:
maneamarius 2022-05-03 11:06:01 +03:00 committed by GitHub
parent 0996abc7c0
commit 5850810715
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 5 deletions

View File

@ -161,6 +161,10 @@ banner_nonroot_install() {
Please set an installation prefix, like this: Please set an installation prefix, like this:
$PROGRAM ${@} --install-prefix /tmp
or
$PROGRAM ${@} --install /tmp $PROGRAM ${@} --install /tmp
or, run the installer as root: or, run the installer as root:
@ -199,7 +203,8 @@ usage() {
USAGE: ${PROGRAM} [options] USAGE: ${PROGRAM} [options]
where options include: where options include:
--install <path> Install netdata in <path>. Ex. --install /opt will put netdata in /opt/netdata. --install <path> Install netdata in <path>. Ex. --install /opt will put netdata in /opt/netdata, this option is deprecated and will be removed in a future version, please use --install-prefix instead.
--install-prefix <path> Install netdata in <path>. Ex. --install-prefix /opt will put netdata in /opt/netdata.
--dont-start-it Do not (re)start netdata after installation. --dont-start-it Do not (re)start netdata after installation.
--dont-wait Run installation in non-interactive mode. --dont-wait Run installation in non-interactive mode.
--stable-channel Use packages from GitHub release pages instead of nightly updates. --stable-channel Use packages from GitHub release pages instead of nightly updates.
@ -370,6 +375,10 @@ while [ -n "${1}" ]; do
NETDATA_PREFIX="${2}/netdata" NETDATA_PREFIX="${2}/netdata"
shift 1 shift 1
;; ;;
"--install-prefix")
NETDATA_PREFIX="${2}/netdata"
shift 1
;;
"--install-no-prefix") "--install-no-prefix")
NETDATA_PREFIX="${2}" NETDATA_PREFIX="${2}"
shift 1 shift 1

View File

@ -135,7 +135,8 @@ USAGE: kickstart.sh [options]
--reinstall-even-if-unsafe Even try to reinstall if we don't think we can do so safely (implies --reinstall). --reinstall-even-if-unsafe Even try to reinstall if we don't think we can do so safely (implies --reinstall).
--disable-cloud Disable support for Netdata Cloud (default: detect) --disable-cloud Disable support for Netdata Cloud (default: detect)
--require-cloud Only install if Netdata Cloud can be enabled. Overrides --disable-cloud. --require-cloud Only install if Netdata Cloud can be enabled. Overrides --disable-cloud.
--install <path> Specify an installation prefix for local builds (default: autodetect based on system type). --install <path> This option is deprecated and will be removed in a future version, use --install-prefix instead.
--install-prefix <path> Specify an installation prefix for local builds (default: autodetect based on system type).
--old-install-prefix <path> Specify an old local builds installation prefix for uninstall/reinstall (if it's not default). --old-install-prefix <path> Specify an old local builds installation prefix for uninstall/reinstall (if it's not default).
--claim-token Use a specified token for claiming to Netdata Cloud. --claim-token Use a specified token for claiming to Netdata Cloud.
--claim-rooms When claiming, add the node to the specified rooms. --claim-rooms When claiming, add the node to the specified rooms.
@ -920,11 +921,11 @@ EOF
confirm_install_prefix() { confirm_install_prefix() {
if [ -n "${INSTALL_PREFIX}" ] && [ "${NETDATA_ONLY_BUILD}" -ne 1 ]; then if [ -n "${INSTALL_PREFIX}" ] && [ "${NETDATA_ONLY_BUILD}" -ne 1 ]; then
fatal "The \`--install\` option is only supported together with the \`--build-only\` option." F0204 fatal "The \`--install-prefix\` and \`--install\` options are only supported together with the \`--build-only\` option." F0204
fi fi
if [ -n "${INSTALL_PREFIX}" ]; then if [ -n "${INSTALL_PREFIX}" ]; then
NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS} --install ${INSTALL_PREFIX}" NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS} --install-prefix ${INSTALL_PREFIX}"
else else
case "${SYSTYPE}" in case "${SYSTYPE}" in
Darwin) Darwin)
@ -1742,6 +1743,11 @@ while [ -n "${1}" ]; do
NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS} --disable-telemetry" NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS} --disable-telemetry"
;; ;;
"--install") "--install")
warning "--install flag is deprecated and will be removed in a future version. Please use --install-prefix instead."
INSTALL_PREFIX="${2}"
shift 1
;;
"--install-prefix")
INSTALL_PREFIX="${2}" INSTALL_PREFIX="${2}"
shift 1 shift 1
;; ;;

View File

@ -63,7 +63,8 @@ The `kickstart.sh` script accepts a number of optional parameters to control how
- `--disable-cloud`: For local builds, dont build any of the cloud code at all. For native packages and static builds, - `--disable-cloud`: For local builds, dont build any of the cloud code at all. For native packages and static builds,
use runtime configuration to disable cloud support. use runtime configuration to disable cloud support.
- `--require-cloud`: Only install if Netdata Cloud can be enabled. Overrides `--disable-cloud`. - `--require-cloud`: Only install if Netdata Cloud can be enabled. Overrides `--disable-cloud`.
- `--install`: Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system). - `--install`: Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system), this option is deprecated and will be removed in a future version, please use `--install-prefix` instead.
- `--install-prefix`: Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system).
- `--old-install-prefix`: Specify the custom local build's installation prefix that should be removed. - `--old-install-prefix`: Specify the custom local build's installation prefix that should be removed.
- `--uninstall`: Uninstall an existing installation of Netdata. - `--uninstall`: Uninstall an existing installation of Netdata.
- `--reinstall-clean`: Performs an uninstall of Netdata and clean installation. - `--reinstall-clean`: Performs an uninstall of Netdata and clean installation.