mirror of
https://github.com/myvesta/vesta.git
synced 2025-03-12 04:35:23 -07:00
Update Wordfence WAF Path
This commit is contained in:
parent
b0b3a9403f
commit
cf1eacde1d
@ -433,18 +433,18 @@ fi
|
||||
|
||||
# ----------- Update Wordfence WAF Path -------------
|
||||
|
||||
# Path to .user.ini file
|
||||
user_ini="$TO_USER/web/$TO_DOMAIN/public_html/.user.ini"
|
||||
# Path to .user.ini file in the new domain directory
|
||||
user_ini="/home/$TO_USER/web/$TO_DOMAIN/public_html/.user.ini"
|
||||
|
||||
# Check if .user.ini exists
|
||||
if [ -f "$user_ini" ]; then
|
||||
echo "Updating .user.ini with new user path..."
|
||||
echo "Updating .user.ini with new path..."
|
||||
|
||||
# Temporary file for modification
|
||||
tmp_file=$(mktemp)
|
||||
|
||||
# Change path from old USER to new USER_TO
|
||||
sed "s|/home/$FROM_USER/public_html|/home/$TO_USER/public_html|g" "$user_ini" > "$tmp_file"
|
||||
# Change path from old domain to new domain
|
||||
sed "s|/home/$FROM_USER/web/$FROM_DOMAIN/public_html|/home/$TO_USER/web/$TO_DOMAIN/public_html|g" "$user_ini" > "$tmp_file"
|
||||
|
||||
# Check if replacement was successful and update .user.ini
|
||||
if [ $? -eq 0 ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user