Skip to content
Browse files

Improves the OpenSolaris (& S10) SMF support. Thanks to Miguel Vidal

<mvidal@libresoft.es> for sending a patch fixing the exec_method's
start property. Additionally, this patch renames the .xml to .xml.pre
so the paths are rewritten according to the real installation paths.


git-svn-id: svn://cherokee-project.com/cherokee/trunk@3424 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent 2a69155 commit 8bbad69c45df41b43bd204e6fd4ad55ac2cf639c @alobbs alobbs committed
Showing with 18 additions and 9 deletions.
  1. +13 −4 Makefile.am
  2. +2 −2 configure.in
  3. +3 −3 http-cherokee.xml → http-cherokee.xml.pre
View
17 Makefile.am
@@ -1,7 +1,7 @@
## Cherokee: Makefile.am -*- makefile -*-
SUBDIRS = po m4 www icons themes qa doc . admin contrib cherokee cget windows dbslayer
-SUFFIXES = .sample.pre .sample .h.pre .h
+SUFFIXES = .sample.pre .sample .h.pre .h .xml.pre .xml
ACLOCAL_AMFLAGS = -I m4
bin_SCRIPTS = cherokee-config
@@ -30,7 +30,8 @@ cherokeeadmindir = $(datadir)/cherokee/admin
sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%datadir%|${datadir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%libdir%|${libdir}|g; s|%localstatedir%|${localstatedir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%phpcgi%|${PHPCGI}|g" $< > $@
.sample.pre.sample:
sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%datadir%|${datadir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%libdir%|${libdir}|g; s|%localstatedir%|${localstatedir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%phpcgi%|${PHPCGI}|g" $< > $@
-
+.xml.pre.xml:
+ sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%datadir%|${datadir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%libdir%|${libdir}|g; s|%localstatedir%|${localstatedir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%phpcgi%|${PHPCGI}|g" $< > $@
CONSTANTS_PRE = \
constants.h.pre
@@ -38,7 +39,6 @@ constants.h.pre
CONSTANTS = \
$(CONSTANTS_PRE:.h.pre=.h)
-
CONFS_PRE = \
cherokee.conf.sample.pre \
performance.conf.sample.pre
@@ -46,10 +46,18 @@ performance.conf.sample.pre
CONFS = \
$(CONFS_PRE:.sample.pre=.sample)
+XMLS_PRE = \
+http-cherokee.xml.pre
+
+XMLS = \
+$(XMLS_PRE:.xml.pre=.xml)
+
+
WINDOWS_PORT_FILES = \
config.h.win32
CLEANFILES = \
+$(XMLS) \
$(CONFS) \
$(CONSTANTS)
@@ -71,13 +79,14 @@ cherokee.pc.in \
svnlog2changelog.py \
changelog-update.sh \
$(m4data_DATA) \
+$(XMLS_PRE) \
$(CONFS_PRE) \
$(CONSTANTS_PRE) \
$(man_MANS) \
$(WINDOWS_PORT_FILES) \
$(COMPILATION_TESTS)
-all-local: $(CONSTANTS) $(CONFS)
+all-local: $(CONSTANTS) $(CONFS) $(XMLS)
install-data-local-config:
@$(mkinstalldirs) $(DESTDIR)$(pkgincludedir);
View
4 configure.in
@@ -1295,9 +1295,9 @@ AC_ARG_ENABLE(admin,
AM_CONDITIONAL(INSTALL_ADMIN, test "x$wants_admin" != "xno")
dnl
-dnl Clean the .pre files
+dnl Clean files generated from *.pre
dnl
-pres="constants.h cherokee.conf.sample performance.conf.sample admin/configured.py contrib/cherokee"
+pres="constants.h cherokee.conf.sample performance.conf.sample http-cherokee.xml admin/configured.py contrib/cherokee"
AC_MSG_NOTICE([Deleting .pre files])
rm -f $pres
View
6 http-cherokee.xml → http-cherokee.xml.pre
@@ -60,7 +60,7 @@
-->
<exec_method type='method'
name='start'
- exec='/usr/sbin/cherokee -b'
+ exec='%prefix%/sbin/cherokee -d'
timeout_seconds='60'>
<method_context>
<method_credential user='root' group='root' />
@@ -73,7 +73,7 @@
-->
<exec_method type='method'
name='stop'
- exec='kill `cat /var/run/cherokee.pid`'
+ exec='kill `cat %localstatedir%/run/cherokee.pid`'
timeout_seconds='60'>
<method_context>
<method_credential user='root' group='root' />
@@ -86,7 +86,7 @@
-->
<exec_method type='method'
name='refresh'
- exec='kill -HUP `cat /var/run/cherokee.pid`'
+ exec='kill -HUP `cat %localstatedir%/run/cherokee.pid`'
timeout_seconds='60'>
<method_context>
<method_credential user='root' group='root' />

0 comments on commit 8bbad69

Please sign in to comment.
Something went wrong with that request. Please try again.