MilesWeb Hosting Forum

Web Hosting Technical Support => How To's => Topic started by: Dipak Bhoi on November 24, 2014, 02:58:33 PM

Title: How do I reset cPanel theme to all users at once?
Post by: Dipak Bhoi on November 24, 2014, 02:58:33 PM
Hello Guys,

The theme for a Cpanel account is specified in the /var/cpanel/users/username file in the format.Through WHm, you can change the theme one by one or based on any package.

Below is a script :

Quote#!/bin/bash
for i in `ls -la /var/cpanel/users/ | awk '{print $9}' | sed '1,3 d'`
do
sed -i "/RS/d" $i;
echo "RS=x3″ >> $i;
done;

After all the files are updated manually, you need to execute the following script to rebuild the cache.

Quote#/scripts/updateuserdomains

The above script will remove the RS option from the file and will append a new line "RS=x3".

That's all. Enjoy