Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section Scripting / API
  • Search

v-change-web-domain-name is BUG

Questions regarding the API
Application Programming Interface
Post Reply
  • Print view
Advanced search
1 post • Page 1 of 1
pqpk2009
Posts: 45
Joined: Sun Mar 27, 2016 2:23 am

v-change-web-domain-name is BUG
  • Quote

Post by pqpk2009 » Mon Sep 09, 2019 8:34 am

Code: Select all

# Changing domain in web.conf
sed -i "s/DOMAIN='$domain'/DOMAIN='$new_domain'/" $USER_DATA/web.conf
new_alias=$(echo "$ALIAS,$domain" |\
    sed -e "s/,/\n/g"|\
    sed -e "s/^$new_domain$//g"|\
    sed -e "/^$/d"|\
    sed -e ':a;N;$!ba;s/\n/,/g')

# Updating domain alias
if [ "$ALIAS" != "$new_alias" ]; then
    sed -i "s/ALIAS='$ALIAS'/ALIAS='$new_alias'/" $USER_DATA/web.conf
fi
Alias empty in the file web.conf will be replaced by all
Top


Post Reply
  • Print view
1 post • Page 1 of 1

Return to “Scripting / API”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password