Remove redundant WP CLI installation checks from multiple scripts

This commit is contained in:
Peca 2025-08-04 16:42:07 +02:00
commit 4dc1e73612
4 changed files with 0 additions and 39 deletions

View file

@ -63,14 +63,6 @@ if [ ! -f "/home/$user/web/$domain/public_html/wp-config.php" ]; then
exit 1; exit 1;
fi fi
if [ ! -f "/usr/local/bin/wp" ] || [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
echo "= WP CLI is not installed. Installing..."
/usr/local/vesta/bin/v-install-wp-cli
fi
if [ ! -f "/usr/local/bin/wp" ] && [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
exit 1;
fi
#----------------------------------------------------------# #----------------------------------------------------------#
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#

View file

@ -264,14 +264,6 @@ if [ $IT_IS_WP -eq 0 ]; then
cd /root cd /root
git clone https://github.com/interconnectit/Search-Replace-DB.git git clone https://github.com/interconnectit/Search-Replace-DB.git
fi fi
else
if [ ! -f "/usr/local/bin/wp" ] || [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
echo "= WP CLI is not installed. Installing..."
/usr/local/vesta/bin/v-install-wp-cli
fi
if [ ! -f "/usr/local/bin/wp" ] && [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
exit 1;
fi
fi fi
CREATE_TO_DATABASE=0 CREATE_TO_DATABASE=0

View file

@ -138,14 +138,6 @@ fi
/usr/local/vesta/bin/v-add-database "$user" "$DBUSERSUF" "$DBUSERSUF" "$PASSWDDB" "mysql" /usr/local/vesta/bin/v-add-database "$user" "$DBUSERSUF" "$DBUSERSUF" "$PASSWDDB" "mysql"
if [ ! -f "/usr/local/bin/wp" ] || [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
echo "= WP CLI is not installed. Installing..."
/usr/local/vesta/bin/v-install-wp-cli
fi
if [ ! -f "/usr/local/bin/wp" ] && [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
exit 1;
fi
WORKINGDIR="/home/$user/web/$domain/public_html" WORKINGDIR="/home/$user/web/$domain/public_html"
rm -rf $WORKINGDIR/* rm -rf $WORKINGDIR/*
cd $WORKINGDIR cd $WORKINGDIR

View file

@ -40,13 +40,6 @@ is_format_valid 'domain' 'user'
is_object_valid 'user' 'USER' "$user" is_object_valid 'user' 'USER' "$user"
is_object_unsuspended 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user"
if [ ! -f "/usr/local/bin/wp" ] || [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
echo "= WP CLI is not installed. Installing..."
/usr/local/vesta/bin/v-install-wp-cli
fi
if [ ! -f "/usr/local/bin/wp" ] && [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
exit 1;
fi
FROM_DATABASE_NAME='' FROM_DATABASE_NAME=''
FROM_DATABASE_USERNAME='' FROM_DATABASE_USERNAME=''
@ -120,14 +113,6 @@ if [ $IT_IS_WP -eq 0 ]; then
cd /root cd /root
git clone https://github.com/interconnectit/Search-Replace-DB.git git clone https://github.com/interconnectit/Search-Replace-DB.git
fi fi
else
if [ ! -f "/usr/local/bin/wp" ] || [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
echo "= WP CLI is not installed. Installing..."
/usr/local/vesta/bin/v-install-wp-cli
fi
if [ ! -f "/usr/local/bin/wp" ] && [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php" ]; then
exit 1;
fi
fi fi