The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

execute script after cpanel start

Discussion in 'cPanel Developers' started by abaco, Jun 28, 2012.

  1. abaco

    abaco Registered

    Joined:
    Jun 28, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello to all:

    We have a problem with the quotas of some accounts.
    Each time the server restarts, some accounts change their quotas size and fail because are over quota.
    In this situation, if we execute /script/resetquotas the problem is solved an the account updated with the correct values

    Now, with any of these accounts, in their /home/{user}/.cpanel/datastore directory there are two files
    _usr_bin_quota_-v with the wrong value.
    _usr_bin_quota_-v_user with the correct value.

    We try change the _usr_bin_quota_-v file with the corrects values, but when the server restarts, fail again and the two files is overwrited.
    Anyone knows where is the origin of this wrong values? Cpanel save the quota size value in some other path?

    In other hand:
    Is there any way to execute a script (/script/resetquotas) automatically, when the server starts and all the cpanel services are loaded and active?

    Sorry for my english and for the ambiguous title of the post.
    Thanks in advance.
    Abaco Creacion
     
  2. MilesWeb

    MilesWeb Well-Known Member
    PartnerNOC

    Joined:
    May 23, 2012
    Messages:
    174
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    See if /home is mounted on server with usrquota

    You can execute the script once server boots everytime. Add the script which you wish to execute in /etc/rc.local
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    It seems that instead of adding an entirely new feature, we should be investigating why this is happening so you don't need a new feature to correct what could just be a bug in our software. I recommend having this investigated: http://go.cPanel.net/bugs
     
  4. abaco

    abaco Registered

    Joined:
    Jun 28, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you very much for your suggestions and sorry for the delayed response.

    You are right, the ideal would be to investigate the real problem, we will try when we get a free moment :)
    Bye
     
Loading...

Share This Page