Check if it's vesta package

This commit is contained in:
Anton Reutov 2021-07-26 14:59:10 +03:00 committed by GitHub
commit c6b79fe5da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,6 +28,23 @@ source $VESTA/conf/vesta.conf
# Checking arg number # Checking arg number
check_args '1' "$#" 'PACKAGE' check_args '1' "$#" 'PACKAGE'
valid=0
if [ "$package" = "vesta" ]; then
valid=1
fi
if [ "$package" = "vesta-nginx" ]; then
valid=1
fi
if [ "$package" = "vesta-php" ]; then
valid=1
fi
if [ "$package" = "vesta-softaculous" ]; then
valid=1
fi
if [ $valid -eq 0 ]; then
echo "Package $package is not valid"
exit 1
fi
#----------------------------------------------------------# #----------------------------------------------------------#
# Action # # Action #