LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 02: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, 03: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, 04: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, 06:27 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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, 06:48 AM   #5
fachamix
Member
 
Registered: Oct 2009
Posts: 122

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


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
Create a daemon dipuasks Ubuntu 1 10-28-2009 08:04 AM
How create daemon from program? monolit Linux - Software 3 09-13-2009 01:33 PM
How to create a console thread for a daemon ? aryan1 Linux - General 1 08-31-2009 04:04 PM
How to create a DAEMON SlacUser Ubuntu 6 04-26-2007 06:08 PM
howto create daemon (service) under suse ? cccc SUSE / openSUSE 2 08-17-2006 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:36 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
Open Source Consulting | Domain Registration