Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-01-2009, 11:22 AM   #1
LQ Newbie
Registered: Apr 2009
Posts: 2

Rep: Reputation: 0
Set a Perl script as an unix service (start with system)

Hello ,
I have a real probleme with my servers :
I have created a Client (script) <-> server (daemon) application (works fine) using SOAP::Lite

If the server is launched using the line command everything works well and the requests are received and the answers sent.

Once i try to set the server side as a real service using : /etc/init.d/ the server is not started at the start time.

And if i use the commande /etc/init.d/myservice start - to start it : the server starts , listens to requests but do nothing else .
however when i use netstat -a | grep myport i see that there are an established connexion between client and server .
i really don't know how to solve this probleme.

Another try was to set a cron task which will start the perl daemon:

cron starts a bash script ( which will see if the server is already on if no starts it ( (like a watchdog) and i got another problème is killed once the finish .
i tried with nohup nothing done . and is i use disown in the .sh file i got the error disown not found .

Thanks for help
Old 04-01-2009, 02:25 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi, welcome to LQ!

Originally Posted by onlymed View Post
Hello ,
Once i try to set the server side as a real service using : /etc/init.d/ the server is not started at the start time.
Please elaborate on *what* you did there. Just putting a script
into that directory will NOT execute it on boot. You need to
have an appropriate symlink to it in one of the rc[23].d directories

Old 04-01-2009, 02:59 PM   #3
LQ Newbie
Registered: Apr 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your replay :
i put a script in
and also create links in rc2 ...

If i launch the created service manually :
/etc/init.d/myService start
the server starts, listen to requests, but didn't answer.

If i starts it using Perl PATH_SERVER/myServer.PL , it works fine
i really don't see where is the problem .

Thanks again for help .


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set a service to start any time the system reboot phongly2000 Linux - Newbie 3 01-16-2009 11:48 AM
How can I make my perl script start when system boots up in HP-UX and in IBM-AIX mach Nings Programming 1 11-26-2008 02:03 AM
LXer: Maximizing Set Match Probability Using Perl On Linux Or Unix LXer Syndicated Linux News 0 09-12-2008 01:30 PM
The Best Method to install Set up a Unix System with PERL, PHP and Apache rhuser Linux - Software 1 03-01-2003 10:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:15 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