List Info

Thread: cherokee init script FEDORA COMPLIANT




cherokee init script FEDORA COMPLIANT
user name
2006-10-06 21:53:27
Hello Alvaro.

Just my first time testing the cherokee web server, and I found a TRIVIAL bug on the init script.I'm using Fedora Core 5 on a x86_64 based system and wanted to start cherokee on startup, so I followed trying some steps:

FC (and any RH-based distro) doesn't have the update-rc.d script; instead, they have chkconfig. So, I created the link on /etc/rc.d and tried to enable cherokee on chkconfig, but it failed,

I build the last 0.5.5 tarball source, and all goes very good, so I went to copy de contrib/cherokee init script to my /etc/init.d/ directory and for make a link to the especial init scripts on /etc/rc[x].d, I use the redhat chkconfig util,

[rootlocalhost init.d]# chkconfig --add cherokee
service cherokee does not support chkconfig

but I realize that the special line for chkconfig wasn't there, and all the things I need for cherokee to start on my Fedora 5 x86_64 based system, (ANGEL OF GOODNESS come to me and inspire me), so I made some investigation of your DAEMON and the arguments, to finally wrote a contrib REDHAT FEDORA compliant cherokee init script for all the folks who have problems with the init so this is the new contrib/cherokee.server.fedora compliant:

******************************************************************
#!/bin/sh
#
# Contrib to RedHat Fedora Based Systems by: carlotezgmail.com">carlotezgmail.com
# chkconfig: 2345 95 05
# description: Starts and stops the Cherokee ligth Web Server system
#

# Source function library
. /etc/rc.d/init.d/functions

NAME=cherokee
BASE=/usr/local/cherokee/sbin/$NAME
DAEMON="-b";
CONF="/etc/cherokee/cherokee.conf"
PIDFILE="/var/run/$NAME.pid"

# Check that $BASE exists.
[ -f $BASE ] || exit 0

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

RETVAL=0
# See how we were called.
case "$1" in
  start)
        if [ -n "`/sbin/pidof $NAME`" ]; then
          ;      echo -n $"$NAME: already running"
     ;           echo ""
       ;         exit $RETVAL
      ;  fi
     ;   echo -n "Starting Cherokee service: "
        $BASE -C $CONF $DAEMON pidfile $PIDFILE
  ;      sleep 1
       ; action "" /sbin/pidof $NAME
        RETVAL=$?
  ;      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cherokee
   ;     ;;
  stop)
        echo -n "Shutting down Cherokee service: "
      ;  killproc $BASE
        RETVAL=$?
  ;      echo
 ;       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/cherokee
   ;     ;;
  restart|reload)
 ;       $0 stop
 ;       $0 start
        RETVAL=$?
        ;;
  status)
      ;  status $BASE
        RETVAL=$?
  ;      ;;
  *)
     ;   echo "Usage: $NAME {start|stop|restart|reload|status}"
      ;  exit 1
esac

exit $RETVAL

******************************************************************

Now everything is fine:

[rootlocalhost init.d]# chkconfig --add cherokee

[rootlocalhost init.d]# chkconfig cherokee on
[rootlocalhost init.d]# service cherokee start
Starting cherokee ...

I could provide a patch, but I don't know how to send the initial script is generated. So, long story short, this issue requires many changes

Thats all Budy !!!
The Cherokee Server just fine on my Fedora 5 x86_64 based system
I hope you can made the changes to that script, or at least, made one called contrib/cherokee.server.fedora with this contrib.


I forgot to tell, I'm a former teacher of operating systems at my university, and the shell programing is a base of that, so I came up with this thing.

Regards,

--
---
Carlitux
Blog Personal: http://carlotez.blogspot.com/
"May the source be with you..."
"In a World without walls and fences who needs WINDOWS and GATES?"
http://counter.li.org/cgi-bin/certificate.cgi/409534

---
Ing. Carlos Alcalá Helguero
Administrador Encargado de Laboratorios de Computo
Universidad Catolica Boliviana "San Pablo";
Phone:  (591)+4249234
Office: (591)+4293100 - Int. 247
Cel:    72735250
Cochabamba - Bolivia


GPG Key:
https://166.114.106.12/~carlotez/key.gpg.asc
pub&nbsp; 1024D/CD98DB19 2006-06-02 Ing. Carlos Javier Alcala Helguero (Administrador de Laboratorios y Servidores) < carlotezgmail.com">carlotezgmail.com >
GPG Fingerprint = BC12 864C 3A3E 9D09 8533  6B7A D3C2 EE1A CD98 DB19
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )