awstat icons should be symbolik link

ehsanch

Verified User
Joined
Jun 2, 2008
Messages
48
i found that in every user hosting account , there is an awstats/icon folder with 2mb size , and some static files.
this folder shuld be a symbolic link , for resource it use on disk space , and backup/restore time.
 
I wonder how many other apps have similar scenarios ...

BTW, awstats is not what everyone uses (although I like it).
 
BTW, awstats is not what everyone uses (although I like it).

How do you know what ehsanch's accounts use? Maybe all of his hosting account do use awstats. That is up to him to decide what his users use.
 
Hello,

I've changed the awstats_process.sh.

I've modified this line:
Code:
cp -Rp ${AWSTATS}/wwwroot/icon ${STATS_DIR}
and changed it to
Code:
#April 17, changed to link, below
#cp -Rp ${AWSTATS}/wwwroot/icon ${STATS_DIR}
I've then added this code, just below the "fi", after the code we just commented out:
Code:
ICON=${STATS_DIR}/icon
if [ ! -h $ICON ]; then
        rm -rf $ICON
        ln -sf ${AWSTATS}/wwwroot/icon $ICON
fi
This should remove the icon directory and replace it with a link for existing awstats/icon paths, and for new accounts as well.

John
 
How do you know what ehsanch's accounts use? Maybe all of his hosting account do use awstats. That is up to him to decide what his users use.

I wasn't referring to ehsanch's clients. I was referring to all DirectAdmin users. Are you always like this? :rolleyes:
 
Are you always like this? :rolleyes:

I have been a contributor here for 5 years. Feel free to go back and look. If you want accurate answers there are several that have been here a long time that you can look to. If you want to feel loved .....
 
Little bump, I think this possible broke my icons.

When I visit my awastats page through directadmin, the icons aren't visible. When I click on it -> view image it says Error: document not found.

When I visit it through domain.tld/stats they however do work.

Can't the CMD_FILE_MANAGER handle symlinks maybe?
 
I don't think so. I only know about this one because it was me who reported the bug to DirectAdmin on email, and they added it to the version system and sent me the link.
 
ditto: I just took a look at it, and implemented the fix. The code is in the versions entry, so can be added to your awstats_process.sh now if you'd like.

For the icons issue, there is a workaround if you want to go back to the old way, but I'll be adding a new CMD_AWSTATS function for the next release, so it can see the icons by following the link.

John
 
ditto: I just took a look at it, and implemented the fix. The code is in the versions entry, so can be added to your awstats_process.sh now if you'd like.

Thank you so much! I am sorry that I was being a little negative about this, but it was a problem for me and my customers. Wonderful!

About the icons issue, I think I will wait for the next release, as I don't consider that as a big problem that need to be fixed right away.

Again, thank you! I am actual very pleased with DirectAdmin, and so are my customers! :)
 
Last edited:
Back
Top