refactoring: log_event(), is_format_valid()

This commit is contained in:
Serghey Rodin 2016-06-09 16:31:56 +03:00
commit e05dca61a6
211 changed files with 756 additions and 1091 deletions

View file

@ -25,7 +25,7 @@ check_args '1' "$#" 'TYPE [HOST]'
types=$(echo "$BACKUP_SYSTEM" |sed "s/,/\n/g" |grep "^$type$")
if [ -z "$types" ]; then
echo "Error: invalid backup type"
log_event "$E_INVALID" "$EVENT"
log_event "$E_INVALID" "$ARGUMENTS"
exit $E_INVALID
fi
@ -51,6 +51,6 @@ bckp=$(echo "$BACKUP_SYSTEM" |\
sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $VESTA/conf/vesta.conf
# Logging
log_event "$OK" "$EVENT"
log_event "$OK" "$ARGUMENTS"
exit