Re: [gentoo-user] daemon start up problem
On 2006-02-08 10:08, K. Mike Bradley uttered these thoughts: Hello, I am running latest Gentoo. I want to start my app as a daemon. This app has a script to do so. webservice.sh I copied this file to /etc/init.d/ I made a link: /etc/runlevels/default/webctrl --- /etc/init.d/webservice.sh If I start manually it's ok: /etc/init.d/webservice.sh start But when I re-boot I get: *WARNING: /etc/init.d/webctrl missing ... Skipping[ok] I would imagine that the init system of Gentoo expects the links in /etc/runlevels/... to have the same name as the script they link to. So to get proper behaviour: ln -sf /etc/init.d/webservice.sh /etc/runlevels/default/webservice.sh (or rc-update add webservice.sh default) Then remove /etc/runlevels/default/webctrl That should fix it... -- / Patrick Börjesson \ --- / () The ASCII Ribbon Campaign - against HTML Email \ /\ and proprietary formats. pgpTrQCW7YE8n.pgp Description: PGP signature
RE: [gentoo-user] daemon start up problem
I tried rc-update originally but got an error message which is why I manually made the link. I removed the webctrl link and rc-update as you detailed and it worked this time, but ... When I boot I get: Usage: /sbin/rc { start | stop} And the service is not running. Could this be a script error in the webservice.sh provided by the app vendor? Thanks for all your help. -Original Message- From: Patrick Börjesson [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 08, 2006 10:37 AM To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] daemon start up problem On 2006-02-08 10:08, K. Mike Bradley uttered these thoughts: Hello, I am running latest Gentoo. I want to start my app as a daemon. This app has a script to do so. webservice.sh I copied this file to /etc/init.d/ I made a link: /etc/runlevels/default/webctrl --- /etc/init.d/webservice.sh If I start manually it's ok: /etc/init.d/webservice.sh start But when I re-boot I get: *WARNING: /etc/init.d/webctrl missing ... Skipping[ok] I would imagine that the init system of Gentoo expects the links in /etc/runlevels/... to have the same name as the script they link to. So to get proper behaviour: ln -sf /etc/init.d/webservice.sh /etc/runlevels/default/webservice.sh (or rc-update add webservice.sh default) Then remove /etc/runlevels/default/webctrl That should fix it... -- / Patrick Börjesson \ --- / () The ASCII Ribbon Campaign - against HTML Email \ /\ and proprietary formats. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] daemon start up problem
K. Mike Bradley wrote: Here is the script: snip You haven't read the documentation for Gentoo rc-scripts. This script was likely developed for a different distribution, for example Debian. Gentoo rc-scripts require, in addition to start() and stop(), a checkconfig() function that lets the rc services know what services this one requires. You'll need to either manually figure out the dependencies and add a checkconfig(), or simply add 'webservice.sh start ' to /etc/conf.d/local.start and 'webservice.sh stop ' to /etc/conf.d/local.stop as another poster recommended. To learn more about rc-scripts and their required functions, run '/etc/init.d/webservice.sh help' (or any service in /etc/init.d). Also, the script as provided seems to expect to be run from a certain CWD with your JRE relative to there. This is unlikely to work on Gentoo, especially given Gentoo's use of java-config to support different JREs. -- gentoo-user@gentoo.org mailing list