1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

auto-statistics

Discussion in 'Plesk for Linux - 8.x and Older' started by MaRiOs, Aug 23, 2005.

  1. MaRiOs

    MaRiOs Guest

    0
     
    Is there any way to have statistics auto-enabled each time a new hosting is created in plesk ?
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Create an event handler triggered by Physical Hosting creation.

    Event Handler Command would be:

    /usr/local/psa/bin/domain.sh -u <new_domain_name> -webstat true

    I believe that should do it.
     
  3. MaRiOs

    MaRiOs Guest

    0
     
    you mean /usr/local/psa/bin/domain.sh -u <new_domain_name> -webstat true ??
     
  4. jamesyeeoc

    jamesyeeoc Guest

    0
     
    For your Event handler script, that would be correct. Sorry I didn't replace that in my earlier post. It has been edited now.
     
  5. MaRiOs

    MaRiOs Guest

    0
     
    ok it worked fine..
    now the difficult part..is to
    make that plesk-stat folder locked automatically too :) any idea master ? :D
     
  6. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Wasn't that a different posted thread?? I thought you had already resolved that one.

    You can setup (another) Event Handler using:
    If I remember correctly, you wanted to make all the plesk-stat directories for all domains have the same username and password (correct me if I'm wrong), so you would fill in the above with 'theusername' and 'thepassword'.

    I am too tired to test this one, but you should be able to figure it out, now that you are getting good at Event handlers :)

    If the -c option gives any error about directory exists, then try replacing it with -u
    (ie. try update instead of create)
     
  7. MaRiOs

    MaRiOs Guest

    0
     
    No its different.

    i want this to be done
    1.enable stats.
    2.lock plesk-stat/ (so that it will create the login/pass
    3. use the same to lock another folder.

    I just didnt knew that i could use that commmand to lock the other folder too.
    I thought i would use the password file of /plesk-stat/ for lokcin the other folder too.
     
  8. jamesyeeoc

    jamesyeeoc Guest

    0
     
    But you will be supplying the login/pass, right? It will not pick them at random.

    If you wanted to use the same /pd/d..plesk-stat auth file, then you could write your own script to modify the domain's vhost.conf file, and run that as an Event.

    Hmm, I'm so tired right now I can't think straight, so I may not be on the same wavelength as you, regarding exactly what you are trying to accomplish :)
     
  9. MaRiOs

    MaRiOs Guest

    0
     
    Iused this :

    /usr/local/psa/bin/protdir.sh -u "plesk-stat" -domain "<new_domain_name>" -type both -add_user "<new_system_user>" -passwd "<new_system_user_password>"

    but its not working.....

    maybe its the fault of the " ill try remove them
     
  10. MaRiOs

    MaRiOs Guest

    0
     
    Now it looks like this : /usr/local/psa/bin/protdir.sh -u plesk-stat -domain <new_domain_name> -type both -add_user <new_system_user> -passwd <new_system_user_password>

    and still not workin :/
     
  11. MaRiOs

    MaRiOs Guest

    0
     
    ok this makes the trick :

    /usr/local/psa/bin/protdir.sh -c plesk-stat -domain <new_domain_name> -type both -add_user <new_system_user> -passwd <new_system_user_password> -title "Domain statistics"


    it works.

    the question now is ..
    can i make it to create folders outsite the httpdocs ? or in the cgi-bin folder?
    something like cgi-bin/myprivatecgis/

    or cgi scripts can also run from inside the httpdocs folder?
     
Loading...