Initial import - (formaly a SVN project named rcopy)

This commit is contained in:
2017-01-24 15:15:01 +01:00
commit 76433059ad
16 changed files with 3079 additions and 0 deletions

54
conf/rcopy_functions.conf Normal file
View File

@@ -0,0 +1,54 @@
#######################################################
## Functions for remote backupscript ##
#######################################################
# --------------------------------------------------- #
# ------------------- Funktionen -------------------- #
#
echolog(){
if [ -n "$2" ];then
case $_DEBUG in
0)
if [ "$2" -eq 0 ]; then
echo -e "$1" >> $logFile
fi
;;
1)
if [ "$2" -lt 2 ]; then
echo -e "$1" >> $logFile
fi
;;
2)
echo -e "$1" >> $logFile
;;
*)
;;
esac
else
echo -e "$1" >> $logFile
fi
}
#
#
echononl(){
echo X\\c > /tmp/shprompt$$
if [ `wc -c /tmp/shprompt$$ | awk '{print $1}'` -eq 1 ]; then
# echo "$*\\c" 1>&2
echo "$*\\c" >> $logFile
else
# echo -e -n "$*" 1>&2
echo -e -n "$*" >> $logFile
fi
rm /tmp/shprompt$$
}
#
#
fatal(){
echolog "!!! The backup procedure was interrupted !!!"
echolog "\nError:\n\t $*"
echolog "\n*** End Update -- no backups are done ***\n\n"
exit 1
}
#
# ------------------ Ende Funktionen ---------------- #
# --------------------------------------------------- #