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

Hosting Software and Control Panels Software used in the web hosting industry. Topics include control panels, add-on software, setup scripts, etc.
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 03-04-2004, 05:04 PM
mrl14 mrl14 is offline
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

Reply With Quote


Sponsored Links
  #2  
Old 03-04-2004, 05:12 PM
Jim_UK Jim_UK is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 1,613
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 : UK based web host
Clook Internet USA : US based web host
UK or US based web hosting, reseller accounts and fully managed dedicated servers!


Reply With Quote
  #3  
Old 03-04-2004, 09:23 PM
p[] p[] is offline
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

Reply With Quote
Sponsored Links
  #4  
Old 03-19-2004, 09:56 PM
MartinK MartinK is offline
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.

Reply With Quote
  #5  
Old 03-20-2004, 12:25 PM
Jim_UK Jim_UK is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 1,613
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 : UK based web host
Clook Internet USA : US based web host
UK or US based web hosting, reseller accounts and fully managed dedicated servers!


Reply With Quote
  #6  
Old 03-20-2004, 12:41 PM
MattF MattF is offline
Web Hosting Master
 
Join Date: Nov 2000
Location: UK
Posts: 2,723
Or you could just replace x2 before replacing x

__________________
Matt Freeman - Reassuringly cynical and controversial - @nonuby

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
cPanel Conference 2012: Branding and How to Do it Better with Felipe Gasper Web Hosting News 2012-10-09 18:00:02
cPanel Conference 2012: What's New with cPanel and WHM with Ken Power Web Hosting News 2012-11-12 13:54:56
Web Hosting Control Panel cPanel and WHM Version 11.32 Adds Features, Fixes Web Hosting News 2012-04-08 11:51:35
cPanel Launches Version 11.32 of Control Panel and Web Host Manager Web Hosting News 2012-02-15 12:46:33
Control Panel cPanel Launches New Apache Configuration Script Web Hosting News 2011-12-28 19:41:39


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?
Advertisement:
Web Hosting News:



 

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?