Skip to content
This repository has been archived by the owner on Apr 5, 2019. It is now read-only.

Commit

Permalink
some refactor on the folders and a new shell script to backup and dep…
Browse files Browse the repository at this point in the history
…loy configurations on nagios
  • Loading branch information
fcecagno committed Sep 24, 2012
1 parent ab8565d commit 7d31828
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 8 deletions.
7 changes: 0 additions & 7 deletions backup-nagios-config.sh

This file was deleted.

31 changes: 31 additions & 0 deletions conf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

function copy {
dev_dir="$1"
src_dir="$2"
dst_dir="$3"
for i in `find $dev_dir -type f -name '*' -exec echo {} \; | grep -v '.git'`
do
file_src="$src_dir/$i"
file_dst="$dst_dir/$i"
echo "Copying $file_src to $file_dst"
if [ -e "$file_src" ]
then
echo "OK!"
#cp "$file_src" "$file_dst"
fi
done
}

if [ "$1" == "deploy" ]
then
copy "nagios" "." "/usr/local"
copy "nagiosgraph" "." "/etc"
elif [ "$1" == "backup" ]
then
copy "nagios" "/usr/local" "."
copy "nagiosgraph" "/etc" "."
else
echo "Invalid option!"
fi

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ define command {

define command {
command_name service-out-of-date
command_line $USER1$/check_dummy 3 "UNKNOWN: This service is out-of-date"
command_line $USER1$/check_dummy 3 "This service is out-of-date"
}

define command {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 7d31828

Please sign in to comment.