LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 08-10-2004, 03:06 PM   #1
dellcom1800
Member
 
Registered: Apr 2003
Location: Connecticut, USA
Distribution: Gentoo Ubuntu
Posts: 69

Rep: Reputation: 15
Question run as a daemon


I am running to linux comps (RH8) the just run SETI@home from UC Berkeley. I would like to no how to run a program as a daemon so that i can remotely disengage/engage the program over ssh (using putty). this way when the shell closes out it is still running in the background
 
Old 08-10-2004, 03:10 PM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
gnu screen might be what you are looking for.
 
Old 08-10-2004, 03:14 PM   #3
dellcom1800
Member
 
Registered: Apr 2003
Location: Connecticut, USA
Distribution: Gentoo Ubuntu
Posts: 69

Original Poster
Rep: Reputation: 15
that seems to be more of a remote interface, i already have that, i just want to run the program

" ./setiathome " as a daemon
 
Old 08-10-2004, 05:21 PM   #4
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
ok, what do you mean to "remotely disengage/engage" the program?
Not to detach it with screen and reattach to it remotely later on?
How about using ctrl-z, bg, disown and kill then?
Or do you want to have own init script for it, in the same way you can start and stop eg. apache (/etc/init.d/apache stop, etc)? Then make a copy of one of them and alter it to your needs.
 
Old 08-10-2004, 09:43 PM   #5
dellcom1800
Member
 
Registered: Apr 2003
Location: Connecticut, USA
Distribution: Gentoo Ubuntu
Posts: 69

Original Poster
Rep: Reputation: 15
init scripts



sry for the confusion
 
Old 10-15-2004, 01:30 AM   #6
supertrout
LQ Newbie
 
Registered: Sep 2003
Location: The milky way galaxy
Distribution: Debian
Posts: 11

Rep: Reputation: 0
Well.. I think i figured your issue out friend... try this as a shell script.. lemme know if it works ---Edit after this--- Well.. yea.. I didnt read the last sentence of a few posts up.. but this will also work.. if you dont want to swim through those files ---edit before this--

As long as it runs one of them.. I think this should be fine..


Code:
#!/bin/bash


PID="`ps aux|grep <process name>|awk '{print $2}'`"

kill $PID

echo Killed!?
^^^ That to stop

Code:
#!/bin/bash

/path/to/thing/to/start
echo Started!?
^^^ To start


In my next release..(pfft) the starting script will just generate a pid file..it will also check for the pid file and alert you if more then one has been started...weeee... that should work.. should is the key word of course

Last edited by supertrout; 10-15-2004 at 01:38 AM.
 
Old 10-15-2004, 07:38 AM   #7
dellcom1800
Member
 
Registered: Apr 2003
Location: Connecticut, USA
Distribution: Gentoo Ubuntu
Posts: 69

Original Poster
Rep: Reputation: 15
thnx ill try that this weekend

that should really help...!!!
 
  


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
MySQL Daemon doesn't run stedo Debian 1 11-23-2005 08:07 AM
how to run a program as a daemon? iclinux Linux - Newbie 2 04-20-2005 12:11 AM
Can't run talk daemon ust Linux - General 3 05-24-2004 04:07 PM
Getting daemon to run at startup HaPPYFaCe Slackware 1 07-10-2003 08:50 PM
How do you run xine as a daemon? cmisip Linux - Software 3 02-11-2003 02:44 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration