Trying to create init script

Andy Pieters mailings at vlaamse-kern.com
Mon Nov 21 07:48:12 UTC 2005


Hi

> Currently, I start a proprietary map application from /etc/rc.local,
> which works fine.  I would now like to use chkconfig to manage the app,
> so an init script is in order.  However, the app doesn't create it's own
> PID, so using "daemon" in the init script does not work - it won't fork!
No app creates a pid.  The PID or process id gets assigned by the system when 
the app is launched.

Once the app is running, you can find out its pid by doing a ps xua | grep 
"name_of_app" or /usr/bin/pidof name_of_app

Having a pid file is not a requirement either since you can find out the pid 
of the app with the above commands and kill the app when needed.
> But, it's still not working quite right: the app doesn't go into the
> background.

To make your app go to the background put an ampersand after its name

Example

updatedb&

Note the & it makes the updatedb execute on the background.

HTH

Andy

-- 
Now listening to Top! Radio Live www.topradio.be/stream on amaroK
Geek code: www.vlaamse-kern.com/geek
Registered Linux User No 379093
If life was for sale, what would be its price?
www.vlaamse-kern.com/sas/ for free php utilities
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20051121/4b8d566d/attachment-0001.sig>


More information about the fedora-list mailing list