LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-13-2009, 10:29 AM   #1
monolit
Member
 
Registered: Aug 2009
Posts: 30

Rep: Reputation: 15
How create daemon from program?


Hello can you help me with following problem? I want to do daemon from usuall program like VNCserver. I think that I must get the program to the started scripts - is it right?
 
Old 09-13-2009, 12:55 PM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by monolit View Post
Hello can you help me with following problem? I want to do daemon from usuall program like VNCserver. I think that I must get the program to the started scripts - is it right?
How To Setup Linux VNC Server In 3 Minutes

Using VNC And Redhat Linux

That should cover it.
 
Old 09-13-2009, 01:01 PM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,577
Blog Entries: 31

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Use the start-stop-daemon function in /lib/lsb/init-functions. Here's an example of using it from /etc/init.d/skeleton
Code:
do_start()
{
    # Return
    #   0 if daemon has been started
    #   1 if daemon was already running
    #   2 if daemon could not be started
    start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
        || return 1
    start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
        $DAEMON_ARGS \
        || return 2
    # Add code here, if necessary, that waits for the process to be ready
    # to handle requests from services started subsequently which depend
    # on this one.  As a last resort, sleep for some time.
}
 
Old 09-13-2009, 02:33 PM   #4
monolit
Member
 
Registered: Aug 2009
Posts: 30

Original Poster
Rep: Reputation: 15
Thank you boys ...but the lutusp report is concrete too ...and the catkin's report is too complicated( I found the posibillity in update-rc.d, btw I am Debian user...
 
  


Reply


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 create a console thread for a daemon ? aryan1 Linux - General 1 08-31-2009 05:04 PM
How to create a DAEMON SlacUser Ubuntu 6 04-26-2007 07:08 PM
java program as daemon dsubbarao Linux - Newbie 9 03-02-2007 12:17 AM
howto create daemon (service) under suse ? cccc SUSE / openSUSE 2 08-17-2006 06:53 PM
damon programming....Why cant my daemon create files? vimes Programming 4 03-16-2006 06:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:27 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration