LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-29-2009, 03:47 PM   #1
fachamix
Member
 
Registered: Oct 2009
Posts: 122

Rep: Reputation: 16
create a daemon


how can i create a daemon ???? how can i make my program to run as a daemon ???? or my bash script ???? I use ubuntu 9.04 and debian 5 stable
 
Old 10-29-2009, 04:07 PM   #2
fachamix
Member
 
Registered: Oct 2009
Posts: 122

Original Poster
Rep: Reputation: 16
better ....

how can I make an already compiled program , or an already write bash script, tu run as a daemon ??????


what about make them run at startup time , during os boot '????

debian / ubuntu
 
Old 10-29-2009, 05:47 PM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
# nohup program >> /dev/null 2>&1 &
 
Old 10-29-2009, 07:27 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
nohup /home/me/program > /home/me/program.log 2>&1 &

'>' replaces the logfile each time you restart it, '>>' will concatenate the output, but in either case, remember to watch the diskspace. Maybe get logrotate to handle that.
 
Old 11-04-2009, 07:48 AM   #5
fachamix
Member
 
Registered: Oct 2009
Posts: 122

Original Poster
Rep: Reputation: 16
thanks!!!!!!
 
  


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
Create a daemon dipuasks Ubuntu 1 10-28-2009 09:04 AM
How create daemon from program? monolit Linux - Software 3 09-13-2009 02:33 PM
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
howto create daemon (service) under suse ? cccc SUSE / openSUSE 2 08-17-2006 06:53 PM


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