forked from shinken-solutions/shinken
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use /bin/sh when no bash-features are required. * Update Copyright year to 2012 where appropriate. * Quote all variables containing paths (as they may contain spaces). * Replace back-tick command substitution by $(...) (which AFAIK is POSIX-conformant). * Use same path for commandfile in all external_commands. * Use `exec` instead of plenty of redirects.
- Loading branch information
Showing
31 changed files
with
197 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,16 +22,16 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
echo "Going to dir" $DIR | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
echo "Going to dir $DIR" | ||
|
||
cd $DIR/.. | ||
cd "$DIR"/.. | ||
|
||
export LANG=us_US.UTF-8 | ||
|
||
$DIR/launch_scheduler.sh | ||
$DIR/launch_poller.sh | ||
$DIR/launch_reactionner.sh | ||
$DIR/launch_broker.sh | ||
$DIR/launch_receiver.sh | ||
$DIR/launch_arbiter.sh | ||
"$DIR"/launch_scheduler.sh | ||
"$DIR"/launch_poller.sh | ||
"$DIR"/launch_reactionner.sh | ||
"$DIR"/launch_broker.sh | ||
"$DIR"/launch_receiver.sh | ||
"$DIR"/launch_arbiter.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,16 +22,16 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
echo $DIR | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
echo "$DIR" | ||
|
||
cd $DIR/.. | ||
cd "$DIR/.." | ||
|
||
export LANG=us_US.UTF-8 | ||
|
||
$DIR/launch_scheduler_debug.sh | ||
$DIR/launch_poller_debug.sh | ||
$DIR/launch_reactionner_debug.sh | ||
$DIR/launch_broker_debug.sh | ||
$DIR/launch_receiver_debug.sh | ||
$DIR/launch_arbiter_debug.sh | ||
"$DIR"/launch_scheduler_debug.sh | ||
"$DIR"/launch_poller_debug.sh | ||
"$DIR"/launch_reactionner_debug.sh | ||
"$DIR"/launch_broker_debug.sh | ||
"$DIR"/launch_receiver_debug.sh | ||
"$DIR"/launch_arbiter_debug.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,11 +22,13 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
|
||
# needed because arbiter doesn't have a default 'workdir' "properties" attribute: | ||
# Need to change directory to .../var because arbiter doesn't have a | ||
# default 'workdir' "properties" attribute:. | ||
cd "$DIR/../var" | ||
|
||
echo "Launching Arbiter (which reads configuration and dispatches it)" | ||
$BIN/shinken-arbiter -d -c $ETC/nagios.cfg -c $ETC/shinken-specific.cfg | ||
"$BIN"/shinken-arbiter -d -c "$ETC"/nagios.cfg -c "$ETC"/shinken-specific.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,14 +22,18 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
DEBUG_PATH="/tmp/arbiter.debug" | ||
|
||
# needed because arbiter doesn't have a default 'workdir' "properties" attribute: | ||
cd "$DIR/../var" | ||
echo "Launching Arbiter (which reads configuration and dispatches it) in debug mode to the file $DEBUG_PATH" | ||
$BIN/shinken-arbiter -d -c $ETC/nagios.cfg -c $ETC/shinken-specific.cfg -c $ETC/sample.cfg --debug $DEBUG_PATH -p /tmp/arbiter.profile | ||
# Need to change directory to .../var because arbiter doesn't have a | ||
# default 'workdir' "properties" attribute:. | ||
cd "$DIR"/../var | ||
|
||
echo "Launching Arbiter (which reads configuration and dispatches it) " \ | ||
"in debug mode to the file $DEBUG_PATH" | ||
|
||
"$BIN"/shinken-arbiter -d \ | ||
-c "$ETC"/nagios.cfg -c "$ETC"/shinken-specific.cfg -c "$ETC"/sample.cfg \ | ||
--debug "$DEBUG_PATH" -p /tmp/arbiter.profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,9 +22,9 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
|
||
echo "Launching Broker (which exports all data)" | ||
$BIN/shinken-broker -d -c $ETC/brokerd.ini | ||
"$BIN"/shinken-broker -d -c "$ETC"/brokerd.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,10 +22,10 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
DEBUG_PATH="/tmp/broker.debug" | ||
|
||
echo "Launching Broker (which exports all data) in debug mode to the file $DEBUG_PATH" | ||
$BIN/shinken-broker -d -c $ETC/brokerd.ini --debug $DEBUG_PATH | ||
"$BIN"/shinken-broker -d -c "$ETC"/brokerd.ini --debug "$DEBUG_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,9 +22,9 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
|
||
echo "Launching Poller (which launches checks)" | ||
$BIN/shinken-poller -d -c $ETC/pollerd.ini | ||
"$BIN"/shinken-poller -d -c "$ETC"/pollerd.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/bin/bash | ||
|
||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -23,10 +22,10 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
DEBUG_PATH="/tmp/poller.debug" | ||
|
||
echo "Launching Poller (which launches checks) in debug mode to the file $DEBUG_PATH" | ||
$BIN/shinken-poller -d -c $ETC/pollerd.ini --debug $DEBUG_PATH | ||
"$BIN"/shinken-poller -d -c "$ETC"/pollerd.ini --debug "$DEBUG_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/bin/bash | ||
|
||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -23,9 +22,9 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
|
||
echo "Launching Reactionner (which sends notifications)" | ||
$BIN/shinken-reactionner -d -c $ETC/reactionnerd.ini | ||
"$BIN"/shinken-reactionner -d -c "$ETC"/reactionnerd.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,10 +22,10 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
DEBUG_PATH="/tmp/reactionner.debug" | ||
|
||
echo "Launching Reactionner (which sends notifications) in debug mode to the file $DEBUG_PATH" | ||
$BIN/shinken-reactionner -d -c $ETC/reactionnerd.ini --debug $DEBUG_PATH | ||
"$BIN"/shinken-reactionner -d -c "$ETC"/reactionnerd.ini --debug "$DEBUG_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,9 +22,9 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
|
||
echo "Launching Receiver (which manages passive data)" | ||
$BIN/shinken-receiver -d -c $ETC/receiverd.ini | ||
"$BIN"/shinken-receiver -d -c "$ETC"/receiverd.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,10 +22,10 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
DEBUG_PATH="/tmp/receiver.debug" | ||
|
||
echo "Launching receiver (which manages passive data) in debug mode to the file $DEBUG_PATH" | ||
$BIN/shinken-receiver -d -c $ETC/receiverd.ini --debug $DEBUG_PATH | ||
"$BIN"/shinken-receiver -d -c "$ETC"/receiverd.ini --debug "$DEBUG_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,9 +22,9 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
|
||
echo "Launching Scheduler (that is only in charge of scheduling)" | ||
$BIN/shinken-scheduler -d -c $ETC/schedulerd.ini | ||
"$BIN"/shinken-scheduler -d -c "$ETC"/schedulerd.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2009-2011: | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2009-2012: | ||
# Gabes Jean, [email protected] | ||
# Gerhard Lausser, [email protected] | ||
# Gregory Starck, [email protected] | ||
|
@@ -22,10 +22,10 @@ | |
# along with Shinken. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
DIR=$(cd $(dirname "$0"); pwd) | ||
BIN=$DIR"/../bin" | ||
ETC=$DIR"/../etc" | ||
DIR="$(cd $(dirname "$0"); pwd)" | ||
BIN="$DIR"/../bin | ||
ETC="$DIR"/../etc | ||
DEBUG_PATH="/tmp/scheduler.debug" | ||
|
||
echo "Launching Scheduler (that is only in charge of scheduling) in debug mode to the file $DEBUG_PATH" | ||
$BIN/shinken-scheduler -d -c $ETC/schedulerd.ini --debug $DEBUG_PATH | ||
"$BIN"/shinken-scheduler -d -c "$ETC"/schedulerd.ini --debug "$DEBUG_PATH" |
Oops, something went wrong.