mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 05:14:10 -07:00
v-delete-wordpress-uploads-php-files: set default response to 'yes' for moving files to quarantine
This commit is contained in:
parent
a5f2e6acd5
commit
3801e8d6cf
1 changed files with 14 additions and 20 deletions
|
@ -38,9 +38,8 @@ echo "-------------------------------------"
|
||||||
echo "$files"
|
echo "$files"
|
||||||
echo "-------------------------------------"
|
echo "-------------------------------------"
|
||||||
|
|
||||||
while true; do
|
read -r -p "Do you want to move these files to quarantine? (y/n, default: y): " RESPONSE < /dev/tty
|
||||||
read -r -p "Do you want to delete these files? (y/n): " RESPONSE < /dev/tty
|
if [ "$RESPONSE" == "y" ] || [ "$RESPONSE" == "Y" ] || [ -z "$RESPONSE" ]; then
|
||||||
if [ "$RESPONSE" == "y" ] || [ "$RESPONSE" == "Y" ]; then
|
|
||||||
for file in $files; do
|
for file in $files; do
|
||||||
source_file="/home/$USER/web/$DOMAIN/public_html/$file"
|
source_file="/home/$USER/web/$DOMAIN/public_html/$file"
|
||||||
destination_file="/srv/wp-uploads-php-files-quarantine/$DOMAIN/$file"
|
destination_file="/srv/wp-uploads-php-files-quarantine/$DOMAIN/$file"
|
||||||
|
@ -52,12 +51,7 @@ while true; do
|
||||||
quarantined=1;
|
quarantined=1;
|
||||||
done
|
done
|
||||||
chown -R $USER:$USER "/srv/wp-uploads-php-files-quarantine/$DOMAIN"
|
chown -R $USER:$USER "/srv/wp-uploads-php-files-quarantine/$DOMAIN"
|
||||||
break;
|
fi
|
||||||
fi
|
|
||||||
if [ "$RESPONSE" == "n" ] || [ "$RESPONSE" == "N" ]; then
|
|
||||||
break;
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
if [ $quarantined -eq 1 ]; then
|
if [ $quarantined -eq 1 ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue