Re: [SLUG] web-script
Trevor, Sorry for responding late how are you going to start a network connection from a web page when you need network connection to access the web port? Wouldn't you prefer /etc/init.d/network restart? sorry for sounding stupid. Could I ask what that type of script would be useful for? what i would like is a start / stop link on a web page to run sat the following eg../etc/rc.d/init.d/network start -- Regards, Kevin Saenz Spinaweb I.T consultants Ph: 02 4620 5130 Fax: 02 4625 9243 Mobile: 0418455661 Web: http://www.spinaweb.com.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] web-script
Kevin Saenz wrote: Trevor, Sorry for responding late how are you going to start a network connection from a web page when you need network connection to access the web port? Wouldn't you prefer /etc/init.d/network restart? under debian the restart does nothing else than a ifdown followed by an ifup, ie reconfiguration of the network interfaces. a stop and start does more like mounting devices. so it in some cases it makes senses to stop and start again instead of a simple restart. sorry for sounding stupid. Could I ask what that type of script would be useful for? good question :) cya -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] web-script
under debian the restart does nothing else than a ifdown followed by an ifup, ie reconfiguration of the network interfaces. a stop and start does more like mounting devices. so it in some cases it makes senses to stop and start again instead of a simple restart. Are we talking about RH 9.0 or Debian? :-) sorry for sounding stupid. Could I ask what that type of script would be useful for? good question :) cya -- Regards, Kevin Saenz Spinaweb I.T consultants Ph: 02 4620 5130 Fax: 02 4625 9243 Mobile: 0418455661 Web: http://www.spinaweb.com.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] web-script
This one time, at band camp, Kevin Saenz wrote: under debian the restart does nothing else than a ifdown followed by an ifup, ie reconfiguration of the network interfaces. a stop and start does more like mounting devices. so it in some cases it makes senses to stop and start again instead of a simple restart. Are we talking about RH 9.0 or Debian? :-) service network restart [Red Hat] and /etc/init.d/networking restart [Debian] are pretty much identical. -- [EMAIL PROTECTED] http://spacepants.org/jaq.gpg -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
RE: [SLUG] web-script
I assume you have two ethernet cards. Otherwise this becomes a comical situation: The machine can't up its network interface because the http side of things isn't running because the NIC is down... :) If you don't have two network cards, then you may want to use something like a cyclades box or a KVM, depending on how far away you are from the box. If you do have two ethernet cards, then your suggestion makes more sense and something like Webmin might be suitable. Cheers, Jill. -Original Message- From: Trevor Tregoweth [mailto:[EMAIL PROTECTED] Sent: Monday, 22 December 2003 11:03 AM To: [EMAIL PROTECTED] Subject: [SLUG] web-script Hi All was wondering if someone could give me a little help, i want to be able to run commands from a web interface on a Linux (redhat 9) machine. what i would like is a start / stop link on a web page to run sat the following eg../etc/rc.d/init.d/network start Thanks Trevor Tregoweth -- IMPORTANT NOTICES This email (including any documents referred to in, or attached, to this email) may contain information that is personal, confidential or the subject of copyright or other proprietary rights in favour of Aristocrat, its affiliates or third parties. This email is intended only for the named addressee. Any privacy, confidence, copyright or other proprietary rights in favour of Aristocrat, its affiliates or third parties, is not lost because this email was sent to you by mistake. If you received this email by mistake you should: (i) not copy, disclose, distribute or otherwise use it, or its contents, without the consent of Aristocrat or the owner of the relevant rights; (ii) let us know of the mistake by reply email or by telephone (+61 2 9413 6300); and (iii) delete it from your system and destroy all copies. Any personal information contained in this email must be handled in accordance with applicable privacy laws. Electronic and internet communications can be interfered with or affected by viruses and other defects. As a result, such communications may not be successfully received or, if received, may cause interference with the integrity of receiving, processing or related systems (including hardware, software and data or information on, or using, that hardware or software). Aristocrat gives no assurances in relation to these matters. If you have any doubts about the veracity or integrity of any electronic communication we appear to have sent you, please call +61 2 9413 6300 for clarification. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] web-script
[EMAIL PROTECTED] wrote on 22/12/2003 11:03:03 AM: Hi All was wondering if someone could give me a little help, i want to be able to run commands from a web interface on a Linux (redhat 9) machine. what i would like is a start / stop link on a web page to run sat the following eg../etc/rc.d/init.d/network start Webmin! You can do it via web interface, or use a telnet/ssh interface. It might even be installed by default on RedHat 9? Cheers, Scott Thanks Trevor Tregoweth-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] web-script
Trevor, Although I question your intentions for running commands over a webpage, try webmin. It has several modules (i think there is one to restart network services), and there is a custom commands section that allows you to run commands from a webpage. Check out http://www.webmin.com. There is an rpm to install webmin quite it easily. Make sure you properly secure webmin by a strong password and access control lists, running under ssl is an even better option if want to use it over internet/public links. Cheers, Shane. On Mon, 2003-12-22 at 11:03, Trevor Tregoweth wrote: Hi All was wondering if someone could give me a little help, i want to be able to run commands from a web interface on a Linux (redhat 9) machine. what i would like is a start / stop link on a web page to run sat the following eg../etc/rc.d/init.d/network start Thanks Trevor Tregoweth __ -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- Shane Machon [EMAIL PROTECTED] LinSec Consulting -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] web-script
On Mon, 2003-12-22 at 11:03, Trevor Tregoweth wrote: Hi All was wondering if someone could give me a little help, i want to be able to run commands from a web interface on a Linux (redhat 9) machine. what i would like is a start / stop link on a web page to run sat the following eg../etc/rc.d/init.d/network start Look at the shell_exec() function in php. There is probably a similar function like this in perl (Gus!) or you could use CGI with an interpreter like /bin/sh. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] web-script
[EMAIL PROTECTED] wrote on 22/12/2003 11:32:46 AM: On Mon, 2003-12-22 at 11:03, Trevor Tregoweth wrote: Hi All was wondering if someone could give me a little help, i want to be able to run commands from a web interface on a Linux (redhat 9) machine. what i would like is a start / stop link on a web page to run sat the following eg../etc/rc.d/init.d/network start Look at the shell_exec() function in php. There is probably a similar function like this in perl (Gus!) or you could use CGI with an interpreter like /bin/sh. Yeah, system(), exec() or back-tick (`), pick your flavor for the job :) Scott -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] web-script
hi all what i would like is a start / stop link on a web page to run sat the following eg../etc/rc.d/init.d/network start Look at the shell_exec() function in php. There is probably a similar function like this in perl (Gus!) or you could use CGI with an interpreter like /bin/sh. i think it is also necessary to switch the user to root to restart the network. and therefor it will be necessary to have a set-suid-wrapper which starts a shell for execution. calling the script without root permission wont work. except you run the apache or what else as root (i hope not :))) ) cya -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html