Provided here is sample code that will use the control panel's "hook" system to automatically install a copy of Joomla to the joomla sub-directory of each account created. A randomized password is used for the install's admin login, and the account owner will be emailed the login information for the new install.
With minimal programming knowledge this sample can be modified and expanded on to handle installing different applications or multiple applications. This possibilities are endless.
Note: The single-domain free version will not work with this automation method. Please test with a 45-day trial license or a paid license.
Copy-and-paste the below code to the /usr/local/cpanel/scripts/postwwwacct file on the server. If the file already exists, the code below likely can be appended to the file.
#!/usr/bin/perl sleep 10; my %OPTS = @ARGV; system( "/usr/local/installatron/installatron". " --install". " --application joomla". " --language es". " --user $OPTS{'user'}". " --url http://$OPTS{'domain'}/joomla" );
Next, ensure the /usr/local/cpanel/scripts/postwwwacct file is chmod 0755 to allow it to be executed.
That's it! The next account created through WHM will automatically install a copy of Joomla.
Copy-and-paste the below code to the /usr/local/directadmin/scripts/custom/user_create_post_confirmed.sh file on the server. If the file already exists, the code below likely can be appended to the file.
#!/bin/sh echo sleep 20;/usr/local/installatron/installatron --install --application joomla --user $username --cp-password 'ADMINS_PASSWORD' --url http://$domain/joomla >> /var/installatron/logs/autoinstall_log | at now
To enable DirectAdmin API communication, replace the ADMINS_PASSWORD value with the main admin's login password.
Finally, ensure the /usr/local/directadmin/scripts/custom/user_create_post_confirmed.sh file is chmod 0755 to allow it to be executed.
That's it! The next account created will automatically install a copy of Joomla.
Support is readily available. We can answer any questions and even assist with your modifications.