mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
Update Wordfence WAF Path
This commit is contained in:
parent
b0b3a9403f
commit
cf1eacde1d
1 changed files with 5 additions and 5 deletions
|
@ -433,18 +433,18 @@ fi
|
||||||
|
|
||||||
# ----------- Update Wordfence WAF Path -------------
|
# ----------- Update Wordfence WAF Path -------------
|
||||||
|
|
||||||
# Path to .user.ini file
|
# Path to .user.ini file in the new domain directory
|
||||||
user_ini="$TO_USER/web/$TO_DOMAIN/public_html/.user.ini"
|
user_ini="/home/$TO_USER/web/$TO_DOMAIN/public_html/.user.ini"
|
||||||
|
|
||||||
# Check if .user.ini exists
|
# Check if .user.ini exists
|
||||||
if [ -f "$user_ini" ]; then
|
if [ -f "$user_ini" ]; then
|
||||||
echo "Updating .user.ini with new user path..."
|
echo "Updating .user.ini with new path..."
|
||||||
|
|
||||||
# Temporary file for modification
|
# Temporary file for modification
|
||||||
tmp_file=$(mktemp)
|
tmp_file=$(mktemp)
|
||||||
|
|
||||||
# Change path from old USER to new USER_TO
|
# Change path from old domain to new domain
|
||||||
sed "s|/home/$FROM_USER/public_html|/home/$TO_USER/public_html|g" "$user_ini" > "$tmp_file"
|
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
|
# Check if replacement was successful and update .user.ini
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue