You are not logged in.

#1 2007-07-31 13:52:34

CaspianXI
Member
Registered: 2007-05-29
Posts: 59

Starrting apps as "services"

I have an application which I like to leave running in the background. I want it to start when I first boot up and when I resume from suspend/hibernate. This app isn't one of the services in /etc/rc.d (if it was, I'd just addit to my DAEMONS in my rc.conf).

Is there any way to treat this app as a daemon so that I can add it to rc.conf? Or, would it be better to edit startup/resume scripts? (I'm really not sure where these scripts are located, though)

Offline

#2 2007-07-31 13:59:44

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Starrting apps as "services"

There are a couple ways you can go about this:

1) If the app is an archlinux package, and it's one most people would likely want to have in the background as a service or daemon, then contact the package maintainer - it should have an /etc/rc.d entry, and the packager should probably add one.
2) If the app is self-compiled, or self-packaged, you can make your own /etc/rc.d script, based off one already existing, to run your app.
3) If you don't want to go to all that trouble, you can just edit /etc/rc.local and add

/path/to/my/service &

Offline

#3 2007-07-31 14:50:30

CaspianXI
Member
Registered: 2007-05-29
Posts: 59

Re: Starrting apps as "services"

Thanks, Cerebral.

This is actually a home-cooked app that I'm using, so there's no package maintainer for me to contact (other than myself wink).

I'll try to make a rc.d entry -- if it doesn't work out, I'll use the /etc/rc.local file.

Thanks!

Offline

#4 2007-07-31 20:28:05

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 130

Re: Starrting apps as "services"

CaspianXI wrote:

I'll try to make a rc.d entry

Shouldn't be too hard to get it working. Just copy one of the existing rc.d files that looks similar to what you want to do and modify it.

Offline

#5 2007-08-01 02:49:54

CaspianXI
Member
Registered: 2007-05-29
Posts: 59

Re: Starrting apps as "services"

I successfully made a rc.d. entry, and it seems to be working so far. As long as smoke and flames don't start coming from my computer, I think everything is working fine.

Thanks smile.

Offline

#6 2007-08-08 10:38:15

kamagurka
Member
From: Munich, Germany
Registered: 2006-02-20
Posts: 150
Website

Re: Starrting apps as "services"

What I do to have console apps work somewhat daemon-like (in that they run in the background) is that I start them in a screen session. I do this with irssi and rtorrent, for example.


I always roll 20s on my disbelieve checks.
You better believe it.

Offline

#7 2007-08-08 16:04:36

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Starrting apps as "services"

and for X apps I use xmove.

Offline

Board footer

Powered by FluxBB