diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-12-28 14:42:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-12-28 14:42:52 +0000 |
commit | 12b9efaebb6d008437af4a72a98d05c4319fc825 (patch) | |
tree | 70876046e52ae898dd7327424f2c27fde1a5d45f /system/edit-config | |
parent | Releasing debian version 1.11.0+dfsg-1~exp1. (diff) | |
download | netdata-12b9efaebb6d008437af4a72a98d05c4319fc825.tar.xz netdata-12b9efaebb6d008437af4a72a98d05c4319fc825.zip |
Merging upstream version 1.11.1+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | system/edit-config | 7 | ||||
-rwxr-xr-x | system/edit-config.in | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/system/edit-config b/system/edit-config index 1696f9f34..e7f50e767 100644 --- a/system/edit-config +++ b/system/edit-config @@ -4,7 +4,12 @@ file="${1}" -EDITOR="${EDITOR-vi}" +if [ "$(command -v editor)" ] ; then + EDITOR="${EDITOR-editor}" +else + EDITOR="${EDITOR-vi}" +fi + [ -z "${NETDATA_USER_CONFIG_DIR}" ] && NETDATA_USER_CONFIG_DIR="/usr/local/etc/netdata" [ -z "${NETDATA_STOCK_CONFIG_DIR}" ] && NETDATA_STOCK_CONFIG_DIR="/usr/local/lib/netdata/conf.d" diff --git a/system/edit-config.in b/system/edit-config.in index 1b86549fa..abfd5a454 100755 --- a/system/edit-config.in +++ b/system/edit-config.in @@ -4,7 +4,12 @@ file="${1}" -EDITOR="${EDITOR-vi}" +if [ "$(command -v editor)" ] ; then + EDITOR="${EDITOR-editor}" +else + EDITOR="${EDITOR-vi}" +fi + [ -z "${NETDATA_USER_CONFIG_DIR}" ] && NETDATA_USER_CONFIG_DIR="@configdir_POST@" [ -z "${NETDATA_STOCK_CONFIG_DIR}" ] && NETDATA_STOCK_CONFIG_DIR="@libconfigdir_POST@" |