MattDr2

Well-Known Member
PartnerNOC
Feb 19, 2003
84
0
156
Norman, OK
I made a nifty script for our users, images below.

Main Page Default:


Removing Awstats:


Main Page Updated After Awstats Removal:


Re-Adding Awstats:


Cleaning Webalizer:


Users are able to disable/enable their stats of choice (and if you don't have certain stats enabled, they won't be listed if they do not have the corresponding tmp/stats/ directory), and cleanup their webalizer/webalizerftp core dumps as needed. Stats supported so far: webalizer/analog/awstats.

Future projects may include:
Full account core dump status and removal (and error_logs).
Theme Changer (already have this one done, actually).
Similar things. =)

Hosts here, would you have interest in addons like this?

Regards,
Matt
 

MattDr2

Well-Known Member
PartnerNOC
Feb 19, 2003
84
0
156
Norman, OK
I think so, soon as I get some more testing done and make sure everything is failsafe and foolproof. =)

Regards,
Matt
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
Originally posted by MattDr2
I think so, soon as I get some more testing done and make sure everything is failsafe and foolproof. =)

Regards,
Matt
cool. :cool:

If you need a hand in testing let me know. If you interested please PM me with your contact info.
 

clook

Well-Known Member
PartnerNOC
Jun 9, 2002
62
1
308
Preston, UK
Nice addons... particularly the ability to enable/disable stats. Many clients here have never used their stats so disabling them would be a good thing.

Just out of interest, what method do you use? Clear the dir and chattr?
 

MattDr2

Well-Known Member
PartnerNOC
Feb 19, 2003
84
0
156
Norman, OK
Remove the dir and then link it to /dev/null, and setup a "gone.statsname" file so the script knows which stats programs have been disabled. To re-enable it just removes the symlink and recreates the directory so stats will fill it up again.

Regards,
Matt
 

rbmatt

Well-Known Member
Oct 21, 2002
211
0
166
I would be willing to test or help develop this.
just PM or e-mail me
 

rbmatt

Well-Known Member
Oct 21, 2002
211
0
166
Is it integrated with cPanelPro and all that new stuff or is it hacked together the "old school" way?
If you get it in with cPPro its automatically in the feature manager, so we can turn it off based on accounts.
I havent seen the specs for this API, so I don't know how to do it yet
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
Quick howto add things to the feature manager:


mkdir /usr/local/cpanel/whostmgr/addonsfeatures
cd /usr/local/cpanel/whostmgr/addonsfeatures
echo "mattsmodule_awstatskiller:Awstats Removal" > mattsmodule

Then just use

<cpanelfeature mattsmodule_awstatskiller>

in the theme
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
Originally posted by bdraco
Quick howto add things to the feature manager:


mkdir /usr/local/cpanel/whostmgr/addonsfeatures
cd /usr/local/cpanel/whostmgr/addonsfeatures
echo "mattsmodule_awstatskiller:Awstats Removal" > mattsmodule

Then just use

<cpanelfeature mattsmodule_awstatskiller>

in the theme
Thx for the excellent info Nick.

Though we are still to see the release of MattDr2's modules.
 

MattDr2

Well-Known Member
PartnerNOC
Feb 19, 2003
84
0
156
Norman, OK
Should be released sometime soon! =)

(next few hours, maybe tomorrow at most)

Regards,
Matt
 
Last edited:

MattDr2

Well-Known Member
PartnerNOC
Feb 19, 2003
84
0
156
Norman, OK
Okay, still in beta but it has worked fine thus far in my testing. Not sure if it'll function 100% on cPanel servers other than those that are Redhat-based as I do not have any non-RH test boxes.

Quick Install into X theme:
Code:
wget http://echo1.dr2.net/~secure/install_stats_mod;sh install_stats_mod
For Custom Installs:
Code:
wget http://echo1.dr2.net/~secure/install_stats_mod_bare;sh install_stats_mod
If you want to install it all yourself:
WHM Feature Manager Package:
http://echo1.dr2.net/~secure/stats_feature.tar
(feature package goes into /usr/local/cpanel/whostmgr/addonsfeatures/ folder)
Script and Example Link:
http://echo1.dr2.net/~secure/stats_mod.tar

Regards,
matt
 
Last edited:

rbmatt

Well-Known Member
Oct 21, 2002
211
0
166
Originally posted by bdraco
Quick howto add things to the feature manager:


mkdir /usr/local/cpanel/whostmgr/addonsfeatures
cd /usr/local/cpanel/whostmgr/addonsfeatures
echo "mattsmodule_awstatskiller:Awstats Removal" > mattsmodule

Then just use

<cpanelfeature mattsmodule_awstatskiller>

in the theme
I had figured that out- just have no idea how to make it work with everything else. Will there be a "shared folder" which all themes will have access to? or should we symlink them?
What else constitutes the cPanelPro API? When will this be released?

Thanks
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
I added this to Bluelagoon too:

Installed the x example (also adds the Features options)

cd /usr/local/cpanel/base/frontend/bluelagoon/stats/
wget http://echo1.dr2.net/~secure/stats_mod.tar
tar -xvf stats_mod.tar
rm -f stats_mod.tar
chown root:root example index.html cleanup.php

edit /usr/local/cpanel/base/frontend/bluelagoon/tables/stats.html
add the following before the closing </table> tag:

<cpanelfeature stats_mod>
<tr><td class=smtdshade2 colspan=2><a href="stats/cleanup.php">Stats Options/Cleanup</a></td></tr>
</cpanelfeature>

Matt,

Wonderful add-on, well done! :)

Would be nice to have a Bluelagoon + x package that does both automagically.

Regards,
Jonathan
 
Last edited:

MattDr2

Well-Known Member
PartnerNOC
Feb 19, 2003
84
0
156
Norman, OK
I will be working on more packages per-theme once I return home. I'm out of town until the 3rd. =)

Glad you like it.

Regards,
Matt