refactoring: log_event(), is_format_valid()

This commit is contained in:
Serghey Rodin 2016-06-24 16:31:43 +03:00
commit a61a6e979e
52 changed files with 582 additions and 1170 deletions

View file

@ -28,7 +28,7 @@ if [ -z $homedir ]; then
fi
# Checking source file
if [ ! -f "$src_file" ]; then
if [ ! -fe "$src_file" ]; then
echo "Error: source file doesn't exist $src_file"
exit 3
fi
@ -41,11 +41,11 @@ if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
fi
# Changing file permissions
sudo -u $user chmod $permissions "$src_file" >/dev/null 2>&1
sudo -u $user chmod -R $permissions "$src_file" >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Error: access permission on $src_file was not changed"
exit 3
fi
# Exiting
exit
exit