public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] daemon start up problem
@ 2006-02-08 15:08 K. Mike Bradley
  2006-02-08 15:36 ` Patrick Börjesson
  2006-02-08 16:08 ` [gentoo-user] " Harry Putnam
  0 siblings, 2 replies; 6+ messages in thread
From: K. Mike Bradley @ 2006-02-08 15:08 UTC (permalink / raw
  To: gentoo-user

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] 

 

If I run:

nano /etc/runlevels/default/webctrl

I get the webservice.sh that the link points to.

Please help.


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [gentoo-user] daemon start up problem
@ 2006-02-08 16:04 K. Mike Bradley
  2006-02-09  4:54 ` Ryan Tandy
  0 siblings, 1 reply; 6+ messages in thread
From: K. Mike Bradley @ 2006-02-08 16:04 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]

Here is the script:
 
 
#!/bin/sh
# description: Start or stop WebServer as a daemon
 
INSTALL_DIR='/opt/WebCTRL3.0'
 
SYSTEM=`uname -rsv`
#
# Set up configuration based on system type
# If not listed, then not supported
#
case $SYSTEM in
   "SunOS 5."*)
      SYSTYPE="Solaris 2.x"
      JREPATH='./java/solaris/jre/bin/java'
      ;;
   "Linux"*)
      SYSTYPE="Linux"
      JREPATH='./java/linux/jre/bin/java'
      ;;
   *)
      echo Unknown or unsupport operating system type
      echo "Operating system type: $SYSTEM"
      echo
      echo Aborting.
      exit 1
      ;;
esac
 
CJARGS='-Dservice.port=8282 -cp classes/common:lib/cjcommon.jar'
LOCK_FILE=/var/lock/subsys/cjgreenserver
 
if test -w "$INSTALL_DIR"
then
   cd $INSTALL_DIR
fi
 
case "$1" in
start)
   $JREPATH $CJARGS CJLauncher WEBSRV </dev/null >/dev/null 2>&1 &
   wcPid=$!;
   sleep 5
   $JREPATH $CJARGS CJLauncher waitforstarted
 
   if [ "$2" == "-wait" ]
   then
      echo $wcPid > /webctrl/tmp/wcPid.txt
   fi
 
   # Create lock file for several versions of Linux
   # (RedHat, SuSE, Mandrake, etc).
   if test -w /var/lock/subsys
   then
      touch $LOCK_FILE
   fi
   ;;
stop)
   $JREPATH $CJARGS CJLauncher stopservice
 
   # Delete lock file for RedHat, SuSE, Mandrake, etc.
   if test -f $LOCK_FILE
   then
      rm $LOCK_FILE
   fi
   ;;
*)
   echo "Usage: $0 { start | stop }"
   ;;
esac
exit 0

 

[-- Attachment #2: Type: text/html, Size: 3704 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-02-09  5:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-08 15:08 [gentoo-user] daemon start up problem K. Mike Bradley
2006-02-08 15:36 ` Patrick Börjesson
2006-02-08 15:49   ` K. Mike Bradley
2006-02-08 16:08 ` [gentoo-user] " Harry Putnam
  -- strict thread matches above, loose matches on Subject: below --
2006-02-08 16:04 [gentoo-user] " K. Mike Bradley
2006-02-09  4:54 ` Ryan Tandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox