]> git.pld-linux.org Git - packages/cherokee.git/commitdiff
- -upstart subpackage auto/th/cherokee-1_0_0-2
authorJacek Konieczny <jajcus@pld-linux.org>
Wed, 12 May 2010 07:10:40 +0000 (07:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- Release: 2

Changed files:
    cherokee.init -> 1.13
    cherokee.spec -> 1.36
    cherokee.upstart -> 1.1

cherokee.init
cherokee.spec
cherokee.upstart [new file with mode: 0644]

index b39b29536501c376fc36a9a9c45dbda286dd8920..8139a1e9c870e33ecd4f75b294fc59900026767b 100644 (file)
@@ -42,11 +42,13 @@ configtest() {
 start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/cherokee ]; then
+               emit starting JOB=cherokee SERVICE=web-server
                msg_starting "Cherokee Web Server"
                daemon cherokee -d
                RETVAL=$?
                if [ $RETVAL -eq 0 ]; then
                        touch /var/lock/subsys/cherokee
+                       emit --no-wait started JOB=cherokee SERVICE=web-server
                fi
        else
                msg_already_running "Cherokee Web Server"
@@ -56,10 +58,12 @@ start() {
 stop() {
        if [ -f /var/lock/subsys/cherokee ]; then
                # Stop daemons.
+               emit stopping JOB=cherokee SERVICE=web-server
                msg_stopping "Cherokee Web Server"
                killproc cherokee
                RETVAL=$?
                rm -f /var/lock/subsys/cherokee >/dev/null 2>&1
+               emit --no-wait stopped JOB=cherokee SERVICE=web-server
        else
                msg_not_running "Cherokee Web Server"
        fi
@@ -104,6 +108,8 @@ reload() {
        fi
 }
 
+upstart_controlled --except configtest
+
 RETVAL=0
 # See how we were called.
 case "$1" in
index 287839af9edbad2c013ea09680d180a237a6a42a..54e8f80cb3e2a30b81d8d37d80f65df8327403d9 100644 (file)
@@ -14,13 +14,14 @@ Summary:    Fast, Flexible and Lightweight Web server
 Summary(pl.UTF-8):     Cherokee - serwer WWW
 Name:          cherokee
 Version:       1.0.0
-Release:       1
+Release:       2
 License:       GPL v2
 Group:         Networking/Daemons
 Source0:       http://www.cherokee-project.com/download/1.0/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5: 2287f647a0a6645347c525b3557f612c
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
+Source3:       %{name}.upstart
 Patch0:                %{name}-config.patch
 Patch1:                %{name}-php-path.patch
 Patch2:                %{name}-panic_path.patch
@@ -39,9 +40,9 @@ BuildRequires:        php-fcgi
 BuildRequires: pkgconfig
 BuildRequires: python-docutils
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.561
 BuildRequires: zlib-devel
-Requires(post,preun):  rc-scripts
+Requires(post,preun):  rc-scripts >= 0.4.3.2
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
 Requires(pre): /bin/id
@@ -78,6 +79,19 @@ znaków, TLS/SSL poprzez OpenSSL, hosty wirtualne, uwierzytelnianie,
 opcje związane z pamięcią podręczną, PHP, własne zarządzanie błędami i
 wiele więcej.
 
+%package upstart
+Summary:       Upstart job description for the Cherokee web server
+Summary(pl.UTF-8):     Opis zadania Upstart dla serwera Cherokee
+Group:         Daemons
+Requires:      %{name} = %{version}-%{release}
+Requires:      upstart >= 0.6
+
+%description upstart
+Upstart job description for the Cherokee web server.
+
+%description upstart -l pl.UTF-8
+Opis zadania Upstart dla serwera WWW Cherokee.
+
 %package admin
 Summary:       Cherokee web server administration interface
 Summary(pl.UTF-8):     Interfejs administracyjny serwera WWW Cherokee
@@ -143,13 +157,14 @@ export PHPCGI=%{_bindir}/php.fcgi
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{pam.d,sysconfig,rc.d/init.d},/var/log/%{name}}
+install -d $RPM_BUILD_ROOT{/etc/{init,pam.d,sysconfig,rc.d/init.d},/var/log/%{name}}
 
 %{__make} -j1 install \
        DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/init/%{name}.conf
 
 # users don't need this
 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic
@@ -199,6 +214,12 @@ if [ "$1" = "0" ]; then
        %groupremove http
 fi
 
+%post upstart
+%upstart_post %{name}
+
+%postun upstart
+%upstart_postun %{name}
+
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
@@ -297,6 +318,10 @@ fi
 %dir %attr(771,cherokee,cherokee) /var/lib/%{name}/graphs
 %dir %attr(771,cherokee,cherokee) /var/lib/%{name}/graphs/images
 
+%files upstart
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf
+
 %files admin -f %{name}.lang
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/cherokee-admin
diff --git a/cherokee.upstart b/cherokee.upstart
new file mode 100644 (file)
index 0000000..e1ae9f9
--- /dev/null
@@ -0,0 +1,16 @@
+
+start on pld.network-started and started SERVICE=syslog and started random
+stop on pld.shutdown-started
+
+env SERVICE=web-server
+export SERVICE
+
+respawn
+
+console output
+
+script
+       exec /usr/sbin/cherokee
+end script
+
+# vi: ft=upstart
This page took 0.063311 seconds and 4 git commands to generate.