From: Support <su...@ea...> - 2002-02-19 06:00:32
|
Hello, I am wanting to build a simple module, in which, a user presses an icon = and and a command is executed on a unix box. example: (User) Presses "Execute" Icon - pressing "Execute" should be = programmed for directory "/usr/local/execute/" and "./fire" begins = the "Execution" on a unix box: user simply types: "cd /usr/local/execute/" and = "./fire" =20 Can someone help me with the following above example. =20 Thanks in Advance!! Diego |
From: Joe C. <jo...@sw...> - 2002-02-19 06:18:14
|
This is exceedingly easy to do: Follow the instructions in the Writing Webmin Modules documentation on the Webmin site (i.e. set up the directory with an icon, module.info, etc.). Then create an index.cgi file that either calls your command, or performs the actions you want performed (if more than one command). You can use perl's system() function or backticks to execute system commands. I'm not sure what else to tell you, short of writing it for you. It is a three hour job, even if you don't know perl and have never written a module for Webmin before (it's a 15 minute job if you know perl and have written modules before). Support wrote: > Hello, > > > > I am wanting to build a simple module, in which, a user presses an icon > and and a command is executed on a unix box. > > > > example: (User) Presses "Execute" Icon - pressing "Execute" should be > programmed for directory "/usr/local/execute/" and "./fire" begins > the "Execution" > > > > on a unix box: user simply types: "cd /usr/local/execute/" and "./fire" > > > > Can someone help me with the following above example. > > Thanks in Advance!! -- Joe Cooper <jo...@sw...> http://www.swelltech.com Web Caching Appliances and Support |
From: Support <su...@ea...> - 2002-02-23 05:46:00
|
hello, I am wanting to remove a few of the default categories from webmin. defaults are: "webmin" "servers" "hardware", etc... I am not sure where the file that controls the the categories is. what directory or file do I need to alter? Thanks, Diego |
From: Joe C. <jo...@sw...> - 2002-02-23 05:53:12
|
Remove, disable, or move to another category all of the modules in the category you'd like to get rid of. The list is dynamically generated based on what the modules you have want to be a part of (this is configured in the module.info file). Support wrote: > hello, > > I am wanting to remove a few of the default categories from webmin. > defaults are: "webmin" "servers" "hardware", etc... I am not sure where > the file that controls the the categories is. what directory or file do I > need to alter? > > Thanks, > > Diego -- Joe Cooper <jo...@sw...> http://www.swelltech.com Web Caching Appliances and Support |
From: Wil C. <wc...@na...> - 2002-02-23 07:42:17
|
Also Sprach Joe Cooper <jo...@sw...> on Fri, Feb 22, 2002 at 09:52:33= PM PST > Remove, disable, or move to another category all of the modules in the=20 > category you'd like to get rid of. The list is dynamically generated=20 > based on what the modules you have want to be a part of (this is=20 > configured in the module.info file). Are you sure about that? I seem to recall when I started writing a test module in a "Test" category, but it ended up in the "Others" category. Yeah, I looked at it and that's what happens. Wil --=20 W. Reilly Cooley wc...@na... Naked Ape Consulting http://nakedape.cc irc.linux.com #orlug,#lnxs For every complex problem, there is a solution that is simple, neat, and wr= ong. -- H. L. Mencken |
From: Joe C. <jo...@sw...> - 2002-02-23 07:55:56
|
Wil Cooley wrote: > Also Sprach Joe Cooper <jo...@sw...> on Fri, Feb 22, 2002 at 09:52:33PM PST > >>Remove, disable, or move to another category all of the modules in the >>category you'd like to get rid of. The list is dynamically generated >>based on what the modules you have want to be a part of (this is >>configured in the module.info file). >> > > Are you sure about that? I seem to recall when I started writing > a test module in a "Test" category, but it ended up in the "Others" > category. Yeah, I looked at it and that's what happens. Nope. You're wrong. ;-) Actually, I didn't explain the situation fully because he wants to remove a category, not add one. To add a category you've got to add information to the language files. Edit your lang/en file in the Webmin root directory to include your creatively named Test category, like so: category_test=Test You're done. So, yep, I'm sure about what I said (the category tabs are generated based on what categories the modules available want to be in--I just left out the bit about that category having to be configured elsewhere). -- Joe Cooper <jo...@sw...> http://www.swelltech.com Web Caching Appliances and Support |
From: Wil C. <wc...@na...> - 2002-02-23 08:07:12
|
Also Sprach Joe Cooper <jo...@sw...> on Fri, Feb 22, 2002 at 11:55:16= PM PST > Wil Cooley wrote: >=20 > > Also Sprach Joe Cooper <jo...@sw...> on Fri, Feb 22, 2002 at 09:5= 2:33PM PST > >=20 > >>Remove, disable, or move to another category all of the modules in the= =20 > >>category you'd like to get rid of. The list is dynamically generated= =20 > >>based on what the modules you have want to be a part of (this is=20 > >>configured in the module.info file). > >> > >=20 > > Are you sure about that? I seem to recall when I started writing > > a test module in a "Test" category, but it ended up in the "Others" > > category. Yeah, I looked at it and that's what happens. >=20 > Nope. You're wrong. ;-) >=20 > Actually, I didn't explain the situation fully because he wants to=20 > remove a category, not add one. To add a category you've got to add=20 > information to the language files. Edit your lang/en file in the Webmin= =20 > root directory to include your creatively named Test category, like so: >=20 > category_test=3DTest >=20 > You're done. So, yep, I'm sure about what I said (the category tabs are= =20 > generated based on what categories the modules available want to be=20 > in--I just left out the bit about that category having to be configured= =20 > elsewhere). Ah, that explains why my test module always ended up in the "Others" category. Thanks. Wil --=20 W. Reilly Cooley wc...@na... Naked Ape Consulting http://nakedape.cc irc.linux.com #orlug,#lnxs For every complex problem, there is a solution that is simple, neat, and wr= ong. -- H. L. Mencken |
From: Joe C. <jo...@sw...> - 2002-02-23 08:17:01
|
Wil Cooley wrote: > Also Sprach Joe Cooper <jo...@sw...> on Fri, Feb 22, 2002 at 11:55:16PM PST > >>Wil Cooley wrote: >> >> >>>Also Sprach Joe Cooper <jo...@sw...> on Fri, Feb 22, 2002 at 09:52:33PM PST >>> >>> >>>>Remove, disable, or move to another category all of the modules in the >>>>category you'd like to get rid of. The list is dynamically generated >>>>based on what the modules you have want to be a part of (this is >>>>configured in the module.info file). >>>> >>>> >>>Are you sure about that? I seem to recall when I started writing >>>a test module in a "Test" category, but it ended up in the "Others" >>>category. Yeah, I looked at it and that's what happens. >>> >>Nope. You're wrong. ;-) >> >>Actually, I didn't explain the situation fully because he wants to >>remove a category, not add one. To add a category you've got to add >>information to the language files. Edit your lang/en file in the Webmin >>root directory to include your creatively named Test category, like so: >> >>category_test=Test >> >>You're done. So, yep, I'm sure about what I said (the category tabs are >>generated based on what categories the modules available want to be >>in--I just left out the bit about that category having to be configured >>elsewhere). >> > > Ah, that explains why my test module always ended up in the > "Others" category. Thanks. You're welcome, Wil. I should confess I had to do a little grepping on the Webmin directory to figure out exactly how Jamie was handling categories to prove myself unwrong. ;-) I was hoping your Mencken sig wasn't true of my answer "simple, neat and wrong." -- Joe Cooper <jo...@sw...> http://www.swelltech.com Web Caching Appliances and Support |