Softaculous


Topic : CLI - Determine if script enabled, or get list of all scripts + status


Posted By: key-systems-plugin on February 13, 2023, 2:52 am
Using cPanel, I need to determine if a script is enabled, and disable it if it is.

I need to be able to do this via CLI across hundreds of servers, and I need to be able to viably automate this with puppet.

I have determined that I can disable the scripts using the Softaculous cli.php file via:
Code

/usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cli.php --disable_script --sid=<SID>


Where <SID> can be determined by:
Code

curl -sv http://api.softaculous.com/scripts.php?in=json | jq '.[] | select(.name | test("^<APPNAME>";"i")) | .sid'


However, in order to prevent subsequent calls to disable_script from being run, I need a way to determine the script status.

How can I do that?

Posted By: Brijesh on February 13, 2023, 1:34 pm | Post: 1
Hi,

You can find the list of enabled scripts in the following PHP file :
/usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/iscripts.php

Do let us know if you face any issues.

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

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.