rpms/lighttpd/devel lighttpd.init,NONE,1.1 lighttpd.spec,1.57,1.58

Matthias Saou thias at fedoraproject.org
Sun Apr 12 16:39:27 UTC 2009


Author: thias

Update of /cvs/extras/rpms/lighttpd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7430

Modified Files:
	lighttpd.spec 
Added Files:
	lighttpd.init 
Log Message:
Update init script to new style.



--- NEW FILE lighttpd.init ---
#!/bin/sh
#
# lighttpd     Lightning fast webserver with light system requirements
#
# chkconfig:   - 85 15
# description: Secure, fast, compliant and very flexible web-server which has \
#              been optimized for high-performance environments. It has a \
#              very low memory footprint compared to other web servers and \
#              takes care of cpu-load.

### BEGIN INIT INFO
# Provides: httpd
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Should-Start: $named
# Should-Stop: $named
# Default-Start: 
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: Lightning fast webserver with light system requirements
# Description:       Secure, fast, compliant and very flexible web-server which
#                    has been optimized for high-performance environments. It
#                    has a very low memory footprint compared to other web
#                    servers and takes care of cpu-load.
### END INIT INFO

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

exec="/usr/sbin/lighttpd"
prog="lighttpd"
config="/etc/lighttpd/lighttpd.conf"

[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

lockfile=/var/lock/subsys/$prog

start() {
    [ -x $exec ] || exit 5
    [ -f $config ] || exit 6
    echo -n $"Starting $prog: "
    daemon $exec -f $config
    retval=$?
    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}

stop() {
    echo -n $"Stopping $prog: "
    killproc $prog
    retval=$?
    echo
    [ $retval -eq 0 ] && rm -f $lockfile
    return $retval
}

restart() {
    stop
    start
}

reload() {
    echo -n $"Reloading $prog: "
    killproc $prog -HUP
    retval=$?
    echo
    return $retval
}

force_reload() {
    restart
}

rh_status() {
    status $prog
}

rh_status_q() {
    rh_status &>/dev/null
}


case "$1" in
    start)
        rh_status_q && exit 0
        $1
        ;;
    stop)
        rh_status_q || exit 0
        $1
        ;;
    restart)
        $1
        ;;
    reload)
        rh_status_q || exit 7
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        rh_status
        ;;
    condrestart|try-restart)
        rh_status_q || exit 0
        restart
        ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
        exit 2
esac
exit $?



Index: lighttpd.spec
===================================================================
RCS file: /cvs/extras/rpms/lighttpd/devel/lighttpd.spec,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- lighttpd.spec	30 Mar 2009 09:30:43 -0000	1.57
+++ lighttpd.spec	12 Apr 2009 16:38:57 -0000	1.58
@@ -6,13 +6,14 @@
 Summary: Lightning fast webserver with light system requirements
 Name: lighttpd
 Version: 1.4.22
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: BSD
 Group: System Environment/Daemons
 URL: http://www.lighttpd.net/
 Source0: http://www.lighttpd.net/download/lighttpd-%{version}.tar.bz2
 Source1: lighttpd.logrotate
 Source2: php.d-lighttpd.ini
+Source3: lighttpd.init
 Source10: index.html
 Source11: http://www.lighttpd.net/favicon.ico
 Source12: http://www.lighttpd.net/light_button.png
@@ -130,12 +131,6 @@
 %{__rm} -rf %{buildroot}
 %{__make} install DESTDIR=%{buildroot}
 
-# Install included init script and sysconfig entry
-%{__install} -D -p -m 0755 doc/rc.lighttpd.redhat \
-    %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd
-%{__install} -D -p -m 0644 doc/sysconfig.lighttpd \
-    %{buildroot}%{_sysconfdir}/sysconfig/lighttpd
-
 # Install (*patched above*) sample config file
 %{__install} -D -p -m 0640 doc/lighttpd.conf \
     %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf
@@ -149,6 +144,10 @@
 %{__install} -D -p -m 0644 %{SOURCE2} \
     %{buildroot}%{_sysconfdir}/php.d/lighttpd.ini
 
+# Install our own init script (the included one is old style)
+%{__install} -D -p -m 0755 %{SOURCE3} \
+    %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd
+
 # Install our own default web page and images
 %{__mkdir_p} %{buildroot}%{webroot}
 %{__install} -p -m 0644 %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} \
@@ -200,7 +199,6 @@
 %dir %{_sysconfdir}/lighttpd/conf.d/
 %config(noreplace) %{_sysconfdir}/lighttpd/lighttpd.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/lighttpd
-%config(noreplace) %{_sysconfdir}/sysconfig/lighttpd
 %{_sysconfdir}/rc.d/init.d/lighttpd
 %{_sbindir}/lighttpd
 %{_sbindir}/lighttpd-angel
@@ -242,7 +240,13 @@
 %{_bindir}/spawn-fcgi
 %{_mandir}/man1/spawn-fcgi.1*
 
+
 %changelog
+* Sun Apr 12 2009 Matthias Saou <http://freshrpms.net/> 1.4.22-3
+- Update init script to new style.
+- No longer include a sysconfig file, though one can be set to override the
+  default configuration file location.
+
 * Mon Mar 30 2009 Matthias Saou <http://freshrpms.net/> 1.4.22-2
 - Update to 1.4.22.
 - Add missing defattr for the spawn-fcgi package.




More information about the scm-commits mailing list