Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-23-2011, 03:21 PM   #1
LQ Newbie
Registered: Jan 2011
Posts: 8

Rep: Reputation: 0
Post Script to test localhost server

Hi there

I've just written a webserver in C and wondered if there was a way of getting a script to test it.

I want it to:
open firefox at localhost:2001
wait 1 second
then EITHER refresh firefox
OR restart firefox localhost:2001

I'm not bothered about actually viewing the page as I have print statements in the C file to check that everything is working. Can you help?

I'm not sure how to capture the PID and to kill or restart it. Thanks.
Old 11-23-2011, 03:31 PM   #2
LQ Guru
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
You don't even need to go that far with opening firefox... You can use curl, and grep known text on your webpage, and test it that way. Sounds more feasible to me...No?
Old 11-23-2011, 03:50 PM   #3
LQ Newbie
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Thank you

I'll look into that, thanks.


bash, scripting, scripts, shell scripting

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql --- Access denied for user 'test'@'localhost' permalac Linux - Server 15 03-05-2013 08:51 PM
[SOLVED] Silencing the line "echo test > test/test.txt" in a shell script Arenlor Linux - General 2 06-18-2010 01:37 PM
httpd2.2.15 access to localhost test page issue NightSky Linux - Server 5 06-16-2010 04:24 PM
Bash script to test if I can SSH to a server? DanHulton Linux - General 2 05-18-2007 01:42 PM
test for name of localhost in script Lotharster Linux - Newbie 3 02-06-2006 03:38 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration