From: Costa Tsaousis (ktsaou) Date: Thu, 14 Jul 2016 19:15:43 +0000 (+0300) Subject: updated shebang for compatibility X-Git-Tag: v1.3.0~67^2~5 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netdata.git;a=commitdiff_plain;h=3824a699715d85e0adf61570a4569d09922c7f5c updated shebang for compatibility --- diff --git a/charts.d/ap.chart.sh b/charts.d/ap.chart.sh index ebd4808e..7b4f690b 100755 --- a/charts.d/ap.chart.sh +++ b/charts.d/ap.chart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +# no need for shebang - this file is loaded from charts.d.plugin # _update_every is a special variable - it holds the number of seconds # between the calls of the _update() function diff --git a/charts.d/apache.chart.sh b/charts.d/apache.chart.sh index 681651a0..837d752d 100755 --- a/charts.d/apache.chart.sh +++ b/charts.d/apache.chart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +# no need for shebang - this file is loaded from charts.d.plugin # the URL to download apache status info apache_url="http://127.0.0.1:80/server-status?auto" diff --git a/charts.d/cpu_apps.chart.sh b/charts.d/cpu_apps.chart.sh index 5a25163e..6b2513dc 100755 --- a/charts.d/cpu_apps.chart.sh +++ b/charts.d/cpu_apps.chart.sh @@ -1,4 +1,4 @@ -#!/bin/sh +# no need for shebang - this file is loaded from charts.d.plugin # THIS PLUGIN IS OBSOLETE # USE apps.plugin INSTEAD diff --git a/charts.d/cpufreq.chart.sh b/charts.d/cpufreq.chart.sh index 7dd994e2..06f692fa 100755 --- a/charts.d/cpufreq.chart.sh +++ b/charts.d/cpufreq.chart.sh @@ -1,4 +1,4 @@ -#!/bin/sh +# no need for shebang - this file is loaded from charts.d.plugin # if this chart is called X.chart.sh, then all functions and global variables # must start with X_ diff --git a/charts.d/exim.chart.sh b/charts.d/exim.chart.sh index c5ed747b..54024c3a 100644 --- a/charts.d/exim.chart.sh +++ b/charts.d/exim.chart.sh @@ -1,4 +1,4 @@ -#!/bin/sh +# no need for shebang - this file is loaded from charts.d.plugin exim_command= diff --git a/charts.d/hddtemp.chart.sh b/charts.d/hddtemp.chart.sh index fea9f801..41c3e247 100755 --- a/charts.d/hddtemp.chart.sh +++ b/charts.d/hddtemp.chart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +# no need for shebang - this file is loaded from charts.d.plugin # if this chart is called X.chart.sh, then all functions and global variables # must start with X_ diff --git a/charts.d/load_average.chart.sh b/charts.d/load_average.chart.sh index 4d86a8f4..e6790d80 100755 --- a/charts.d/load_average.chart.sh +++ b/charts.d/load_average.chart.sh @@ -1,4 +1,4 @@ -#!/bin/sh +# no need for shebang - this file is loaded from charts.d.plugin load_average_update_every=5 load_priority=100 diff --git a/charts.d/mem_apps.chart.sh b/charts.d/mem_apps.chart.sh index f537ada4..ab95b361 100755 --- a/charts.d/mem_apps.chart.sh +++ b/charts.d/mem_apps.chart.sh @@ -1,4 +1,4 @@ -#!/bin/sh +# no need for shebang - this file is loaded from charts.d.plugin mem_apps_apps= diff --git a/charts.d/mysql.chart.sh b/charts.d/mysql.chart.sh index e2392c23..120fec66 100755 --- a/charts.d/mysql.chart.sh +++ b/charts.d/mysql.chart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +# no need for shebang - this file is loaded from charts.d.plugin # http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html # diff --git a/charts.d/nginx.chart.sh b/charts.d/nginx.chart.sh index a082c574..a2a9b320 100755 --- a/charts.d/nginx.chart.sh +++ b/charts.d/nginx.chart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +# no need for shebang - this file is loaded from charts.d.plugin # if this chart is called X.chart.sh, then all functions and global variables # must start with X_ diff --git a/charts.d/nut.chart.sh b/charts.d/nut.chart.sh index a4720845..3c8e1c9d 100755 --- a/charts.d/nut.chart.sh +++ b/charts.d/nut.chart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +# no need for shebang - this file is loaded from charts.d.plugin # a space separated list of UPS names # if empty, the list returned by 'upsc -l' will be used diff --git a/charts.d/opensips.chart.sh b/charts.d/opensips.chart.sh index c7066ec0..ce42ccdd 100755 --- a/charts.d/opensips.chart.sh +++ b/charts.d/opensips.chart.sh @@ -1,4 +1,4 @@ -#!/bin/sh +# no need for shebang - this file is loaded from charts.d.plugin opensips_opts="fifo get_statistics all" opensips_cmd= diff --git a/charts.d/phpfpm.chart.sh b/charts.d/phpfpm.chart.sh index 7cd77269..976ce91b 100755 --- a/charts.d/phpfpm.chart.sh +++ b/charts.d/phpfpm.chart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +# no need for shebang - this file is loaded from charts.d.plugin # if this chart is called X.chart.sh, then all functions and global variables # must start with X_ diff --git a/charts.d/postfix.chart.sh b/charts.d/postfix.chart.sh index f4f71027..b37dbd55 100755 --- a/charts.d/postfix.chart.sh +++ b/charts.d/postfix.chart.sh @@ -1,4 +1,4 @@ -#!/bin/sh +# no need for shebang - this file is loaded from charts.d.plugin # the postqueue command # if empty, it will use the one found in the system path diff --git a/charts.d/sensors.chart.sh b/charts.d/sensors.chart.sh index 06a35af2..9652f896 100755 --- a/charts.d/sensors.chart.sh +++ b/charts.d/sensors.chart.sh @@ -1,4 +1,4 @@ -#!/bin/sh +# no need for shebang - this file is loaded from charts.d.plugin # sensors docs # https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface diff --git a/charts.d/squid.chart.sh b/charts.d/squid.chart.sh index 0eca99bc..88280a3c 100755 --- a/charts.d/squid.chart.sh +++ b/charts.d/squid.chart.sh @@ -1,4 +1,4 @@ -#!/bin/sh +# no need for shebang - this file is loaded from charts.d.plugin squid_host= squid_port= diff --git a/charts.d/tomcat.chart.sh b/charts.d/tomcat.chart.sh index 50a17e2b..cc6baea1 100755 --- a/charts.d/tomcat.chart.sh +++ b/charts.d/tomcat.chart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +# no need for shebang - this file is loaded from charts.d.plugin # Description: Tomcat netdata charts.d plugin # Author: Jorge Romero diff --git a/plugins.d/cgroup-name.sh b/plugins.d/cgroup-name.sh index 8ce64b3d..3cd3cfab 100755 --- a/plugins.d/cgroup-name.sh +++ b/plugins.d/cgroup-name.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin" export LC_ALL=C diff --git a/plugins.d/charts.d.dryrun-helper.sh b/plugins.d/charts.d.dryrun-helper.sh index 64645289..9f024f63 100755 --- a/plugins.d/charts.d.dryrun-helper.sh +++ b/plugins.d/charts.d.dryrun-helper.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # will stop the script for any error set -e diff --git a/plugins.d/node.d.plugin b/plugins.d/node.d.plugin index a1fa754f..270351e4 100755 --- a/plugins.d/node.d.plugin +++ b/plugins.d/node.d.plugin @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash ':' //; exec "$(command -v nodejs || command -v node || command -v js || echo "ERROR node.js IS NOT AVAILABLE IN THIS SYSTEM")" "$0" "$@" // shebang hack from: @@ -42,12 +42,17 @@ var netdata = require('netdata'); function pluginConfig(filename) { var f = path.basename(filename); + // node.d.plugin configuration var m = f.match('.plugin' + '$'); - if(m === null) m = f.match('.node.js' + '$'); if(m !== null) return netdata.options.paths.config + '/' + f.substring(0, m.index) + '.conf'; - return netdata.options.paths.config + '/' + f + '.conf'; + // node.d modules configuration + m = f.match('.node.js' + '$'); + if(m !== null) + return netdata.options.paths.config + '/node.d/' + f.substring(0, m.index) + '.conf'; + + return netdata.options.paths.config + '/node.d/' + f + '.conf'; } // internal defaults diff --git a/plugins.d/tc-qos-helper.sh b/plugins.d/tc-qos-helper.sh index 94eec44a..a0edadac 100755 --- a/plugins.d/tc-qos-helper.sh +++ b/plugins.d/tc-qos-helper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin" diff --git a/python.d/python-modules-installer.sh.in b/python.d/python-modules-installer.sh.in index 620a332b..18f14f12 100755 --- a/python.d/python-modules-installer.sh.in +++ b/python.d/python-modules-installer.sh.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash umask 022