Hi guys,
I need help with some syntax.
I have some customized error pages:
/error_master/400.shtml
/error_master/401.shtml
/error_master/403.shtml
/error_master/404.shtml
that I would like to copy to the public_html of all of my users in /var/cpanel/users
I am basing this off of the script given by forum member brianoz on this post http://forums.cpanel.net/showthread.php?t=57111
Can you please check my syntax?
I would save it as /home/error_insert
Would I run it by exectuing ./error_insert in /home ?
I need help with some syntax.
I have some customized error pages:
/error_master/400.shtml
/error_master/401.shtml
/error_master/403.shtml
/error_master/404.shtml
that I would like to copy to the public_html of all of my users in /var/cpanel/users
I am basing this off of the script given by forum member brianoz on this post http://forums.cpanel.net/showthread.php?t=57111
Can you please check my syntax?
Code:
cd /home
for user in `ls /var/cpanel/users`
do
test ! -d $user && continue
cp /error_master/400.shtml /home/$user/public_html -R
chown $user:$user /home/$user/public_html/400.shtml
cp /error_master/401.shtml /home/$user/public_html -R
chown $user:$user /home/$user/public_html/401.shtml
cp /error_master/403.shtml /home/$user/public_html -R
chown $user:$user /home/$user/public_html/403.shtml
cp /error_master/404.shtml /home/$user/public_html -R
chown $user:$user /home/$user/public_html/404.shtml
cp /error_master/500.shtml /home/$user/public_html -R
chown $user.$user /home/$user/public_html/500.shtml
echo $user complete
done
Would I run it by exectuing ./error_insert in /home ?