LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2005, 11:48 AM   #1
shahidawan
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Rep: Reputation: 0
Question run perl service on Linuxstartup


Dear all,
I hv developed web server in perl which needs to be started as service on startup.
i added code it in /etc/rc like "perl /root/wps/wpsServer.pl"
but as i restart the machine, this service hangs the machine and starts listening for the clients. I dont know how to start that service separately.
should i add it in /etc/rc or anywhere else.
if in /etc/rc/ then at what position?

Thanx.

Last edited by shahidawan; 03-30-2005 at 12:06 PM.
 
Old 03-30-2005, 11:55 AM   #2
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Rep: Reputation: 30
if there is nothing else after that line you will need to put `exec' if there is another line after it you will need to add an '&'.

Also dont forget if you havent added a $PATH at the beginning of the rc file and a path doesnt exist at this point the machine wont know where to find perl.

Last edited by Frustin; 03-30-2005 at 11:56 AM.
 
Old 03-30-2005, 11:57 AM   #3
TheLinuxDuck
Member
 
Registered: Sep 2002
Location: Tulsa, OK
Distribution: Slack, baby!
Posts: 349

Rep: Reputation: 33
Add a '&' after the command:
Code:
perl /root/wps/wpsServer.pl &
This is to force the process into the background, in it's own subshell.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP service in Run Level 3 spelltoronto Linux - Newbie 2 08-15-2005 01:04 PM
How do I run a PHP script as a service? robbiemorgan Linux - Newbie 3 04-13-2005 02:03 PM
run app as service MiniBubba Mandriva 3 09-19-2004 07:51 AM
Getting mysql4 to run as a Service jerry_redhat Linux - Software 1 07-27-2003 04:17 AM
Run as Service... tisource Linux - General 2 08-18-2002 04:27 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:45 AM.

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