commit 9424dcf0793d78e198c379aa8aac31d9685b17ba Author: Nathanael D. Noblet <nathanael@xxxxxxx> Date: Wed Jul 13 13:28:54 2011 -0600 start as dspam user dspam-init.d | 13 ++++++------- dspam-sysconfig | 3 ++- dspam.spec | 5 ++++- 3 files changed, 12 insertions(+), 9 deletions(-) --- diff --git a/dspam-init.d b/dspam-init.d index 8b331b0..eae9f75 100644 --- a/dspam-init.d +++ b/dspam-init.d @@ -23,6 +23,7 @@ if [ -f /etc/sysconfig/dspam ] ; then . /etc/sysconfig/dspam else DSPAM_BIN="/usr/bin/dspam" + DSPAM_USER="dspam" fi # Check that networking is up. @@ -36,13 +37,11 @@ start() { if [ -f /var/lock/subsys/dspam ]; then RETVAL=0 else - ${DSPAM_BIN} --daemon 2>/dev/null& - RETVAL=$? - if [ $RETVAL -eq 0 ]; then - echo_success - else - echo_failure - fi + daemon --check ${DSPAM_BIN} --user ${DSPAM_USER} ${DSPAM_BIN} --daemon 2>/dev/null& + + sleep 1 + + status ${prog} &> /dev/null && echo_success || echo_failure fi echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dspam diff --git a/dspam-sysconfig b/dspam-sysconfig index 986b490..dbe961a 100644 --- a/dspam-sysconfig +++ b/dspam-sysconfig @@ -1,2 +1,3 @@ # Location of dspam binary -DSPAM_BIN="/usr/bin/dspam" \ No newline at end of file +DSPAM_BIN="/usr/bin/dspam" +DSPAM_USER="dspam" \ No newline at end of file diff --git a/dspam.spec b/dspam.spec index ff464c6..93255a3 100644 --- a/dspam.spec +++ b/dspam.spec @@ -11,7 +11,7 @@ Summary: A library and Mail Delivery Agent for Bayesian SPAM filtering Name: dspam Version: 3.9.0 -Release: 20%{?dist} +Release: 21%{?dist} License: GPLv2 Group: System Environment/Daemons Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz @@ -376,6 +376,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/httpd/conf.d/dspam-web.conf %changelog +* Wed July 13 2011 Nathanael Noblet <nathanael@xxxxxxx> - 3.9.0-21 +- Start daemon as dspam user + * Wed May 25 2011 Nathanael Noblet <nathanael@xxxxxxx> - 3.9.0-20 - add tmpfile for /var/run/dspam - remove rpaths that suddenly show up in F15 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel