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
################################################################################ | |
############################# Monit control file ############################# | |
################################################################################ | |
## | |
# | |
# Comments begin with a '#' and extend through the end of the line. Keywords | |
# are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
# |
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
#!/bin/bash | |
currentDate=`date +%F` # Gets current day in full formate | |
outputName="configBackup-$currentDate"; # Sets the output file name | |
tmp="/tmp"; # Sets temp folder location | |
randStr=`</dev/urandom tr -dc A-Za-z0-9 | head -c8`; # Stores a random string of letters and numbers of 8 characters in length | |
tmpFullDirName=$tmp/"configBackup-$randStr" # Sets the name of temporal folder from where the script will work | |
backupTargetDir=$tmpFullDirName; # Sets the temporal folder that we'll backup, this is the full previous variable | |
workingDir=`pwd` # Gets the folder path from where we ran the script | |
folderList=`ls -l | egrep '^d' | awk '{ print $9 }'` |
NewerOlder