hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Software and Control Panels : Quick way to change cpanel theme on all accounts
Reply

Forum Jump

Quick way to change cpanel theme on all accounts

Reply Post New Thread In Hosting Software and Control Panels Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
Web Hosting Master
 
Join Date: Jul 2002
Posts: 710

Quick way to change cpanel theme on all accounts


Is there a quick way to change the CPanel theme used on all web accounts?

__________________
Hockey is Life



Sponsored Links
  #2  
Old
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 1,616
Run this command:

replace RS=oldtheme RS=newtheme -- /var/cpanel/users/*

Change the bits in bold to the name of your old and new themes.

__________________
Clook Internet
UK based web hosting, reseller accounts and fully managed dedicated and virtual servers! In our 12th year and counting...


  #3  
Old
WHT Addict
 
Join Date: Feb 2004
Posts: 161
... Or just go to your packages in WHM, and modify the theme for that package, it will then result in changing all the users cpanel themes that are under that package. Jim's command would work better for serverwide replacement, but you couldn't run it if your a reseller..

__________________
Brad Mahaffey - VanillaGreen.com
Blood Sweat Vector

Sponsored Links
  #4  
Old
Newbie
 
Join Date: Dec 2001
Posts: 23
There is a problem with the code provided. For example.. if you have some users on "x" theme and some on x2 then you run..
replace RS=x RS=x2 -- /var/cpanel/users/*
It will replace all the x2 themes with x22 which will stop them from working.
In addition, if you have your own theme with x in there will be a problem. if you have resellers with an x in... etc..
But don't get me wrong, it will save a lot of time just have to be usre to use with care.

  #5  
Old
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 1,616
Quote:
Originally posted by MartinK
There is a problem with the code provided. For example.. if you have some users on "x" theme and some on x2 then you run..
replace RS=x RS=x2 -- /var/cpanel/users/*
It will replace all the x2 themes with x22 which will stop them from working.
In addition, if you have your own theme with x in there will be a problem. if you have resellers with an x in... etc..
But don't get me wrong, it will save a lot of time just have to be usre to use with care.
You are correct, my apologies for overlooking that. A better way of doing this (changing all on 'x' to 'x2') via command line is to run the following command:

perl -pi -e "s/RS=x\n/RS=x2\n/g" /var/cpanel/users/*

An addition can be made to backup all modified files by running this which will make a backup with the same filename plus .bak in the same directory:

perl -pi.bak -e "s/RS=x\n/RS=x2\n/g" /var/cpanel/users/*

Code:
[ james@admin ] ~$ cat test
RS=x2
RS=x
RS=letterxhere

[ james@admin ] ~$ perl -pi -e "s/RS=x\n/RS=x2\n/g" test
[ james@admin ] ~$ cat test
RS=x2
RS=x2
RS=letterxhere

[ james@admin ] ~$

__________________
Clook Internet
UK based web hosting, reseller accounts and fully managed dedicated and virtual servers! In our 12th year and counting...


  #6  
Old
Web Hosting Master
 
Join Date: Nov 2000
Location: Thailand
Posts: 3,339
Or you could just replace x2 before replacing x

__________________
Reassuringly cynical and controversial - Twitter: @nonuby

Reply

Related posts from TheWhir.com
Title Type Date Posted
ResellerZOOM Listing 2013-12-11 23:26:57
ResellerZOOM Listing 2013-12-11 23:26:56
GoDaddy Supports cPanel as Part of Web Hosting Updates Web Hosting News 2014-05-09 12:40:20
SSHD Rootkit in the Wild Blog 2013-02-22 16:44:08
cPanel Security Updates Address Perl Module Vulnerabilities Web Hosting News 2012-12-06 12:55:54


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?