Adding new script installers

I am trying to make a new script installer for my own script to be part of new server and be chosen to be installed/uninstalled. I tried copying wordpress.pl and called it merlin.pl and did find/replace on 'wordpress' to 'merlin' and added it using the interface, and it says it is successful, but doesnt show in the 'Install Scripts' section or the disable scripts section. It does show when editing a server plans default scritps though, but there is no script called merlin.pl in the scripts directory. There does seem to be a blank script (no name or decription) in the scipts list and it's disabled (in the section 'Other'), I dont know if that was there before or not

Status: 
Closed (fixed)

Comments

Howdy -- you may want to make sure you've restarted Webmin. It may take a Webmin restart for it to notice a new script in your Install Scripts directory.

To do that, you can run "/etc/init.d/webmin restart".

After performing a restart, is your new script being listed?

A restart didn't help, but I moved the file to the root of the server opposed to the scripts directory and then pointed the script adder to the new location of the installer and it now works

Which directory did you put your new script file in?

I put it in /usr/libexec/webmin/virtual-server/scripts/ origionally

That should work then.

I presume you named it merlin.pl ? Also, did you replace all the functions starting with script_wordpress_ with script_merlin_ ?

Finally, if you run perl -c /usr/libexec/webmin/virtual-server/scripts/merlin.pl , what does it output?

I did try running it without the -c option and it output no error, it doesn't really matter now as I've just uploaded it to a different location and using it from there and it works great :)

Ok, great! What was the other location?

Just the root of the server, it runs even if I delete the script, it must copy the script or store it in a database or something, so I just delete it after I add it to the install scripts

Ok, if you add it to the install scripts it gets copied to /etc/webmin/virtual-server/scripts . That's the best place to put custom-developed scripts like this ..

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