Ability to change install path or remove existing scripts

Hello! Unfortunately, several people use the "Scripts installer" feature, install the script in some test subdirectory, then when they are done with it they just move the stuff (adapting configs) to the website root for example. Problem is that this breaks script upgrades from Virtualmin, cause it expects the script to be in the path it has once been installed in. Also, some people just try a script out and then remove it manually, maybe replacing it with something else. Uninstalling the script from Virtualmin would then delete files that are supposed to stay there. So I think it would be nice to have an option (maybe just for admins, or for domain owners as well, i dunno) to adapt the path of an installed script (in case it has been moved by the user), and also an option to remove a script from the virtualmin listing without actually uninstalling it (cause it might have just been deleted by the user).

Status: 
Active

Comments

I'd strongly recommend against moving scripts around like this, as any have paths in their config files, DB tables and perhaps other locations that will be broken by a move.

However, if you really want to manually change Virtualmin's database of installed scripts, you could edit the files under /etc/webmin/virtual-server/scriptlog . It has one sub-directory per domain, each of which contains one file per installed script.

ronald's picture
Submitted by ronald on Mon, 11/09/2009 - 16:56 Pro Licensee

a joomla 1.15 site can be moved without any problem. Its config file is such that the "live_site" line has no entry and it knows somehow it has moved.
Searching for the site under /etc/webmin/virtual-server/scriptlog is hard as the folders only contain numbers.

Having 40 or more Joomla sites it takes a long time to find the correct domain let alone if there are hundreds of domains/sites.

Isn't there a way to make the search faster and easier, name the folders by the domainname instead of numbers?
Also there is little (no) control over a client who wants to work this way by testing in a subdirectory and then move it up. I often work that way too.

Also when uninstalling a script e.g. after testing, it is a pain that files (icon; stats) disappear. I also have to move them up then uninstall and move the files back again. I dont think other panels have this feature.

Those aren't showstoppers, but if there is another solution it would be really awesome.

i perfectly understand that it is bad practice to move stuff around. but go tell the clients what they have to do... when they do move around, they surelly are skilled enough to adapt the configuration files to keep their thing going. but when an upgrade pops up in virtualmin, it will get installed in the old unused path, potentially even destroying things. same for uninstalling. thus, i think a way for admins to adapt script installer installed paths or just plain remove an installed script entry without uninstalling it, would be welcome.

I'll look into this and see what kind of solution I can come up with ..

FYI: I recently stumbled across this and mentioned this on the forum and here in the tracker: http://virtualmin.com/node/31977

Basically, the idea is to extend the current concept of "custom fields" for vmin hosts and use those to store/retrieve config settings that would be exposed to the vhost via conventional apache environment variables, and instead of patching the files with hardcoded strings, a lookup request, e.g. via getenv() would be done.

That way, webmin/vmin could easily manage things like hardcoded paths, mySQL credentials etc.

In other words, it would not just become possible to easily rename and move things around, but even migrate installed scripts to other webmin servers.

Just some food for thought :-)