Submitted by graham_howden1 on Mon, 12/06/2010 - 08:38
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
Submitted by andreychek on Mon, 12/06/2010 - 09:17 Comment #1
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?
Submitted by graham_howden1 on Mon, 12/06/2010 - 09:20 Comment #2
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
Submitted by JamieCameron on Mon, 12/06/2010 - 14:25 Comment #3
Which directory did you put your new script file in?
Submitted by graham_howden1 on Mon, 12/06/2010 - 14:47 Comment #4
I put it in /usr/libexec/webmin/virtual-server/scripts/ origionally
Submitted by JamieCameron on Mon, 12/06/2010 - 15:32 Comment #5
That should work then.
I presume you named it
merlin.pl
? Also, did you replace all the functions starting withscript_wordpress_
withscript_merlin_
?Finally, if you run
perl -c /usr/libexec/webmin/virtual-server/scripts/merlin.pl
, what does it output?Submitted by graham_howden1 on Mon, 12/06/2010 - 15:48 Comment #6
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 :)
Submitted by JamieCameron on Mon, 12/06/2010 - 16:22 Comment #7
Ok, great! What was the other location?
Submitted by graham_howden1 on Mon, 12/06/2010 - 16:28 Comment #8
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
Submitted by JamieCameron on Mon, 12/06/2010 - 16:35 Comment #9
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 ..Submitted by Issues on Mon, 12/20/2010 - 17:48 Comment #10
Automatically closed -- issue fixed for 2 weeks with no activity.