commit dc6db7a99af761d208ae2cac2e212f885501873d
Author: Jeremy Hinegardner <jeremy(a)hinegardner.org>
Date: Mon Sep 30 17:33:00 2013 -0600
change daemonization in init script to account for beanstalk removing -d flag
beanstalkd.init | 4 ++--
beanstalkd.spec | 6 +++++-
2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/beanstalkd.init b/beanstalkd.init
index de399a3..250338b 100644
--- a/beanstalkd.init
+++ b/beanstalkd.init
@@ -41,7 +41,7 @@ start() {
[ -x $exec ] || exit 5
echo -n $"Starting $prog: "
# if not running, start it up here, usually something like "daemon $exec"
- options="-l ${BEANSTALKD_ADDR} -p ${BEANSTALKD_PORT} -u ${BEANSTALKD_USER}"
+ options="-l ${BEANSTALKD_ADDR} -p ${BEANSTALKD_PORT}"
if [ "${BEANSTALKD_MAX_JOB_SIZE}" != "" ]; then
options="${options} -z ${BEANSTALKD_MAX_JOB_SIZE}"
fi
@@ -62,7 +62,7 @@ start() {
fi
fi
- daemon $exec -d $options
+ daemon /usr/sbin/daemonize -u ${BEANSTALKD_USER} $exec $options
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
diff --git a/beanstalkd.spec b/beanstalkd.spec
index 1e665ba..7266dde 100644
--- a/beanstalkd.spec
+++ b/beanstalkd.spec
@@ -6,7 +6,7 @@
Name: beanstalkd
Version: 1.9
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A simple, fast work-queue service
Group: System Environment/Daemons
@@ -18,6 +18,7 @@ Source2: %{name}.sysconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: daemonize
Requires(pre): shadow-utils
Requires(pre): %{_sbindir}/groupadd
Requires(post): chkconfig
@@ -101,6 +102,9 @@ fi
%changelog
+* Mon Sep 30 2013 Jeremy Hinegardner <jeremy(a)hinegardner.org> - 1.9-2
+- Change initscript to use daemonize(1) as beanstalk does not self daemonize anymore
+
* Mon Sep 30 2013 Jeremy Hinegardner <jeremy(a)hinegardner.org> - 1.9-1
- update to latest upstream 1.9