Mass Delete a Script Installer Script?

I have about 20 SugarCRM instances. It appears that my clients are not taking to Sugar as I thought they would.

I would like to batch delete these instances.

Failing that, I would like to have a clean way to locate/list the paths to these instances.

Thanks, K

Status: 
Closed (fixed)

Comments

This is one of those things that is best done using the command-line API. If you wanted to remove all instances of sugarcrm from all domains, you could do it with a shell loop like :

for dom in \`virtualmin list-domains --name-only\`; do
  virtualmin delete-script --domain $dom --type sugarcrm
done

Can we enhance this a tiny bit to say, if a certain table in the installed application's database has < X records?

For example, delete SugarCRM if the number of Contacts is <2.

It's awesomely cool that there's an API. I'd still love to be able to execute this inquiry from the Virtualmin GUI.

Best, K

I guess you could do that by putting a call to mysql in the script, but you'd have to do your own shell scripting ..

This kind of specific request is much more suited to the API than the Virtualmin GUI.

Is there an API way to get the name of the database associated with a script installer? Then that name could be passed to the MySQL call...

Thanks, K

Yes .. you could get the DB name with a command like :

virtualmin list-scripts --domain $dom --type sugarcrm --multiline | grep Database: | awk '{ print $2 }'

Automatically closed -- issue fixed for 2 weeks with no activity.