Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Vesta CLI
  • Search

change all users web template

Questions regarding the Command Line Interface
CLI
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
paunescumihai
Posts: 5
Joined: Sat Jan 07, 2017 11:19 pm

change all users web template
  • Quote

Post by paunescumihai » Wed Feb 08, 2017 8:28 pm

Hello.
How to i mass change all domains in vesta cp from "default" to "phpfcgid"?


i tried:
v-change-user-template iovis web phpfcgid
it changes the: cat /usr/local/vesta/data/users/iovis/user.conf
FNAME=''
LNAME=''
PACKAGE='single'
WEB_TEMPLATE='phpfcgid'
PROXY_TEMPLATE='default'
DNS_TEMPLATE='default'
WEB_DOMAINS='1'
WEB_ALIASES='0'
DNS_DOMAINS='0'
DNS_RECORDS='0'
MAIL_DOMAINS='0'
MAIL_ACCOUNTS='0'
DATABASES='1'
......

then i tried:
vps iovis # v-rebuild-user iovis
but it does not change the web template (in web panel nore in httpd.conf)
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: change all users web template
  • Quote

Post by skamasle » Wed Feb 08, 2017 10:41 pm

Web template is defined in /usr/local/vesta/data/users/iovis/web.conf

You can sed it ( first do a backup of your web.conf

Code: Select all

sed -i "s/TPL='default'/TPL='phpfcgid'/"  /usr/local/vesta/data/users/iovis/web.conf
Then

Code: Select all

v-rebuild-web-domains lovis
It should work.
Top

paunescumihai
Posts: 5
Joined: Sat Jan 07, 2017 11:19 pm

Re: change all users web template
  • Quote

Post by paunescumihai » Thu Feb 09, 2017 1:35 am

yeah, it works.
But there must be one command to do it for all the users with their domains at the same time....

edit1:

i mean one system command or something...

cause i can do it like this:
for user in $(v-list-sys-users plain); do sed -i "s/TPL='default'/TPL='phpfcgid'/" /usr/local/vesta/data/users/$user/web.conf;done
then:
for user in $(v-list-sys-users plain); do v-rebuild-web-domains $user;done
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “CLI”



  • 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
 

 

cron

Login  •  Register

I forgot my password