Hooks File https://www.softaculous.com/board/index.php?tid=7926 <![CDATA[Hooks File]]> https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p31666
Quote
I want to use "firefox.sh" and other software install new vps.when I
create a new vps,then the system will use "after_creatvps.php"  install
software what I want.thanks
       


Do you want to install this Software inside windows VPS ?
]]>
Thu, 16 Jun 2016 04:21:35 GMT https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p31666
<![CDATA[Hooks File]]> https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p31651
Quote From : jasonskycom June 15, 2016, 10:31 am
I want to use "firefox.sh" and other software install new vps.when I create a new vps,then the system will use "after_creatvps.php"  install software what I want.thanks

please tell me how to do.thanks]]>
Wed, 15 Jun 2016 10:32:36 GMT https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p31651
<![CDATA[Hooks File]]> https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p31650 Wed, 15 Jun 2016 10:31:45 GMT https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p31650 <![CDATA[Hooks File]]> https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p27392
You use a similar code like below to edit/overwrite the config file of a VPS.

function __after_createvps($vps){

    // The Config File Path will differ with the Virtualization technology used:
    For kvm : /etc/libvirt/qemu/vpsid.xml
    For Xen : /etc/xen/auto/vpsid.cfg

    $handle = fopen(<path-to-config-file>/$vps['vpsid'].<xml/cfg>, "r+");
 

   
// Write your code here for Editing the Config File of the VPS.
    ....... 

    .......
   

    fwrite($handle, $file);

    fclose($handle);

}
]]>
Fri, 07 Aug 2015 07:16:53 GMT https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p27392
<![CDATA[Hooks File]]> https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p27384 ]]> Fri, 07 Aug 2015 00:48:53 GMT https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p27384 <![CDATA[Hooks File]]> https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p27368
Quote From : asim_shaikh August 5, 2015, 11:55 am
Hi,

after_config_write.php  is enough If you just want to make changes inside the config file of the VPS.


So do we just go
PHP Code

 function __after_createvps($vps){
 
    
// Write your code here. e.g. You can add an additional NIC to the VPS configuration file if you wanted.
    
echo "varible1 = blah";
    echo 
"varible2 = stuff";
    echo 
"varible3 = "junk";
 } 




Quote From : asim_shaikh August 5, 2015, 11:55 am

Do you mean to add some custom configuration for each XEN VPS after the configuration is written by virtualizor ?


Idealy in the web admin of Virtualizor say under the advance section when setting up or editing a VPS, there would be a generic text box that we could freehand type extra variables for that particular vps we wanted in the config file. 

That way when the VPS had any changes made to it through either web portal, those changes would stick and be specific to that VPS only.
]]>
Wed, 05 Aug 2015 20:20:19 GMT https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p27368
<![CDATA[Hooks File]]> https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p27365
Quote
Looking for examples of hook scripts.  For example, there are a few
things we want in the config file of each XEN vps.  SO its my guess we
need to create an after_createvps.php  and an after_config_write.php
file.  or just an after_config_write.php file



after_config_write.php  is enough If you just want to make changes inside the config file of the VPS.

Quote
If can give some type of basic example of the format of the php code,  the wiki is very basic.


Ideally, they would add a empty text box to each VPS setup that we
could add the variables we wanted there for each VPS that was not
already configured by the admin.


Do you mean to add some custom configuration for each XEN VPS after the configuration is written by virtualizor ?
]]>
Wed, 05 Aug 2015 11:55:43 GMT https://www.softaculous.com/board/index.php?tid=7926&tpg=1#p27365
<![CDATA[]]> https://www.softaculous.com/board/index.php?tid=7926&tpg=0#p27359
If can give some type of basic example of the format of the php code,  the wiki is very basic.

Ideally, they would add a empty text box to each VPS setup that we could add the variables we wanted there for each VPS that was not already configured by the admin.
]]>
Wed, 05 Aug 2015 04:17:00 GMT https://www.softaculous.com/board/index.php?tid=7926&tpg=0#p27359