Possible to Mass Delete a Script Installer Script?
kenlyle
11/26/08
Offline
Posted: Sat, 2010-03-06 17:34
I was installing LimeSurvey in my server template, but it seems nobody is using it, and the updates are so frequent, it's a distraction. I've got 8 or 10 left. Can I get rid of them in batch?
Now that I've updated those instances, I can't find a quick Virtualmin way to locate them again. Is there a systematic way to find out where a given app is installed?
At least I was consistent in naming the directories. Here's a find command somebody may find useful:
We'll see what Jamie has to say in that bug report, but the only way I know of to handle that would be to go into /etc/webmin/virtual-server/scriptlog, and do a search for the Install Scripts in question.
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
Sorry, I don't believe
Sorry, I don't believe there's a way to mass-uninstall an Install Script.
You can disable them so no one else can install it -- in System Settings -> Scripts Installers -> Disable Scripts.
However, for actual removal, I believe you'll need to go through and do each one individually.
-Eric
Thanks
Now that I've updated those instances, I can't find a quick Virtualmin way to locate them again. Is there a systematic way to find out where a given app is installed?
At least I was consistent in naming the directories. Here's a find command somebody may find useful:
find / -maxdepth 3 -name whateveryouresearchingfor
Ken
Can I at least get a list of install locations?
Failing that, I would like to have a clean way to locate/list the paths to instances of a given program.
It's not trivial, because Joomla, for example, is installed in the root, not a tell-tale name sake directory like I use for some apps.
Best, K
Linking to the bug report on
Linking to the bug report on this:
https://www.virtualmin.com/node/13760
We'll see what Jamie has to say in that bug report, but the only way I know of to handle that would be to go into /etc/webmin/virtual-server/scriptlog, and do a search for the Install Scripts in question.
-Eric
Thanks
Yeah, that's very informative, and I should have linked to my FR. Thanks for handling that.
I am looking to do an rsync of just Script Installer managed Joomla instances for now.
K
Fix from Jamie on the Feature Request
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 donePosted by JamieCameron on Sun, 2010-03-14 13:10
Remove App based on low record count?
Anyone know how to 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.
I reached a dead end in the API docs.
Best, Ken