Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid linux-specific bash absolute path #1334

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/documentation/dashboard_scripted.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ $dashboard->{'tab'}->{'xdata'}->{'refresh'} = 10;
This example is a simple shell script which has label with the current time.

------
#!/bin/bash
#!/usr/bin/env bash
# title: Scripted Bash
# user: thrukadmin
# groups: [{"*" : "read-only"}]
Expand Down
2 changes: 1 addition & 1 deletion examples/config_tool_git_checkin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# config_tool_git_checkin - save hook for thruk config tool to commit changes to git repository
#
Expand Down
2 changes: 1 addition & 1 deletion examples/contacts2csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion examples/dump_services
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion examples/get_logs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion examples/list_hosts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion examples/objectcache2csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion examples/query2testobjects
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion examples/remove_duplicates
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion examples/trigger_eventhandler_at_downtime_end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion examples/worker_command_tester
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion get_version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [ ! -e .git ]; then
echo "not in an development environment, no .git directory found" >&2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

for file in root/js/*.js templates/*.tt; do
sed -i '/TP.tracelog.*console.*temporary debug/d' $file
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugins-available/panorama/scripts/enable_debug.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

for file in root/js/*.js templates/*.tt; do
perl -i -pe 's/^(.*?\s+(\w+)[=: ]+function\([^(]*\)\ *\{)$/$1\nif(TP.tracelog) { console.log("$2"); } \/\/ temporary debug/g' $file
Expand Down
2 changes: 1 addition & 1 deletion root/thruk/vendor/extjs_clean.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [ "x$1" = "x" -o ! -d "$1" ]; then
echo "usage: $0 <extjsfolder>"
Expand Down
2 changes: 1 addition & 1 deletion script/check_thruk_rest
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/generate_timeperiod_transitions.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/grafana_export.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This script exports a grafana graph and stores it in a temp file.
#
Expand Down
2 changes: 1 addition & 1 deletion script/html2pdf.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# usage:
#
Expand Down
2 changes: 1 addition & 1 deletion script/install_puppeteer.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# usage: ./install_puppeteer.sh
#
Expand Down
2 changes: 1 addition & 1 deletion script/nagexp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/nagimp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/naglint
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/pnp_export.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This script exports a pnp graph and stores it in a temp file.
#
Expand Down
2 changes: 1 addition & 1 deletion script/reenable_actions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/templates_cleanup.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/theme-icons-update.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/theme-obsolete-images.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/thruk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/thruk_auth
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/thruk_fastcgi_server.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
### BEGIN INIT INFO
# Provides: thruk_fastcgi
Expand Down
2 changes: 1 addition & 1 deletion script/thruk_format_perl_modules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion script/thruk_link_images.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [ "$1" = "" ]; then
echo "usage: $0 <image>"
Expand Down
2 changes: 1 addition & 1 deletion script/thruk_optimize_images.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# usage: ./script/thruk_optimize_images.sh [<image>]
#
Expand Down
2 changes: 1 addition & 1 deletion script/thruk_set_standard_header
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

test -f support/standard_script_header

Expand Down
2 changes: 1 addition & 1 deletion script/thruk_update.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

#export PERL_AUTOINSTALL_PREFER_CPAN=1
export PERL_MM_USE_DEFAULT=1
Expand Down
2 changes: 1 addition & 1 deletion script/thruk_update_docs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

`which asciidoc > /dev/null 2>&1`;
if [ "$?" -ne "0" ]; then
Expand Down
2 changes: 1 addition & 1 deletion script/thruk_version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# usage: ./script/thruk_version.sh
#
Expand Down
2 changes: 1 addition & 1 deletion support/convert_old_datafile.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion support/fcgid_env.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# set thruk environment
# and run fastcgi server

Expand Down
2 changes: 1 addition & 1 deletion support/icinga2_ido_fetchlogs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

INSTANCE_ID=${INSTANCE_ID:-1}

Expand Down
2 changes: 1 addition & 1 deletion support/makecert.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# call this script with an email address (valid or not).
# like:
# ./makecert.sh <common name> <email>
Expand Down
2 changes: 1 addition & 1 deletion support/panorama2img
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# usage:
#
Expand Down
2 changes: 1 addition & 1 deletion support/standard_script_header
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# read rc files if exist
unset PROFILEDOTD
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/_common/ansible/install_role.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

ROLE=$1
shift
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

VERBOSE=0
if [ "x$1" != "x" ]; then
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/auth_krb5/vnc/ff_profile.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if test -e .mozilla; then
echo ".mozilla does already exist"
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/auth_krb5/vnc/kinit.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

for x in $(seq 100); do
yes omd | kinit -f omdadmin >/dev/null 2>&1
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/citest/extra_prepare.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -ex

Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/citest/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [ $(whoami) != "naemon" ]; then
exec sudo su naemon -c "$0 $*"
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/cli_api/t/reschedule_all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

thruk host list | \
while read host; do
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/cli_api/t/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

VERBOSE=$1
if [ "x$VERBOSE" = "x" ]; then
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/cli_api/t/test_root.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

VERBOSE=$1
if [ "x$VERBOSE" = "x" ]; then
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/cli_api/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

FLAGS=""
if [ ! -t 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/cluster_e2e/scale
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [ "x$1" = "x" ]; then
echo "usage: $0 <target number>"
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/lmd_federation_e2e/docker_tc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
#
#
Expand Down
2 changes: 1 addition & 1 deletion t/scenarios/logfile_cache_icinga2_ido_e2e/omd/add_user.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root';" | mysql
echo "FLUSH PRIVILEGES;" | mysql
2 changes: 1 addition & 1 deletion t/scenarios/pentest_arachni/t/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

cd /arachni

Expand Down
2 changes: 1 addition & 1 deletion t/timed_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

for test in t/*.t t/xt/*/*.t; do
out=$(TEST_AUTHOR=1 PERL_DL_NONLAZY=1 perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" $test | grep -v '^All tests')
Expand Down
Loading