mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 05:14:10 -07:00
refactoring: log_event(), is_format_valid()
This commit is contained in:
parent
6e0ef668bb
commit
e05dca61a6
211 changed files with 756 additions and 1091 deletions
|
@ -22,7 +22,7 @@ is_package_in_use() {
|
|||
check_package=$(grep "PACKAGE='$package'" $USER_DATA/*/user.conf)
|
||||
if [ ! -z "$check_package" ]; then
|
||||
echo "Error: package $package is in use"
|
||||
log_event "$E_INUSE" "$EVENT"
|
||||
log_event "$E_INUSE" "$ARGUMENTS"
|
||||
exit $E_INUSE
|
||||
fi
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ is_package_in_use() {
|
|||
#----------------------------------------------------------#
|
||||
|
||||
check_args '1' "$#" 'PACKAGE'
|
||||
validate_format 'package'
|
||||
is_format_valid 'package'
|
||||
is_package_valid
|
||||
is_package_in_use
|
||||
|
||||
|
@ -50,6 +50,6 @@ rm -f $VESTA/data/packages/$package.pkg
|
|||
#----------------------------------------------------------#
|
||||
|
||||
log_history "deleted user package $package" '' 'admin'
|
||||
log_event "$OK" "$EVENT"
|
||||
log_event "$OK" "$ARGUMENTS"
|
||||
|
||||
exit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue