Softaculous


Topic : Softaculous Update hook


Posted By: sparek on January 26, 2020, 2:56 pm
Are there any hooks or systems for running a script after Softaculous (the library... not individual scripts) updates?
For example, you recently released an update to Softaculous... making it Softaculous 5.3.7.  Is there a way I can run a script after Softaculous is updated.
Presumably you'll eventually release Softaculous 5.3.8 ... I'd like to run a script automatically after that update.  Is there a way to do this?

Posted By: Brijesh on January 27, 2020, 12:01 pm | Post: 1
Hi,

Yes we do have a filter for that :
https://www.softaculous.com/docs/developers/filters/#post_softaculous_upgrade

Do let us know if you face any issues.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: sparek on February 17, 2020, 7:36 pm | Post: 2
Are you sure this works with DirectAdmin?
I created the file - /usr/local/directadmin/plugins/softaculous/enduser/hooks/post_softaculous_upgrade.php - with the content:
<?php
insert_filter('post_softaculous_upgrade', 'my_post_softaculous_upgrade', 1);
function my_post_softaculous_upgrade(){
    mail(%myemailaddress%,"Softaculous Upgrade", "Softaculous Upgrade");
}

And I did not get any email after the recent Softaculous Upgrade.

Posted By: Brijesh on February 18, 2020, 10:47 am | Post: 3
Hi,

At the moment the filter is supported only with the filename "filter.php"

Please rename the file to :
/usr/local/directadmin/plugins/softaculous/images/hooks/filter.php

and then the filter should work fine.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.