Browse Source

Implement #202, with exception to dcron's own lack of logging features

master
Michael Schloh von Bennewitz 22 years ago committed by Ralf S. Engelschall
parent
commit
da34efb9e1
  1. 21
      dcron/dcron.spec
  2. 9
      dcron/rc.dcron

21
dcron/dcron.spec

@ -37,7 +37,7 @@ Distribution: OpenPKG [EVAL]
Group: System
License: GPL
Version: %{V_major}.%{V_minor}
Release: 20030722
Release: 20031020
# list of sources
Source0: http://apollo.backplane.com/FreeSrc/dcron%{V_major}%{V_minor}.tgz
@ -53,9 +53,9 @@ AutoReq: no
AutoReqProv: no
%description
A multi-user cron written from scratch by the author, similar to vixie-cron
but with significant differences. Attention paid less to feature creep and
more to usability and reliability.
A multiuser cron written from scratch, dcron is follows concepts of
vixie-cron but has significant differences. Less attention is paid
to feature development in favor of usability and reliability.
%prep
%setup -q -n dcron
@ -96,3 +96,16 @@ AutoReqProv: no
%clean
rm -rf $RPM_BUILD_ROOT
%post
# after upgrade, restart service
[ $1 -eq 2 ] || exit 0
eval `%{l_rc} dcron status 2>/dev/null`
[ ".$dcron_active" = .yes ] && %{l_rc} dcron restart
exit 0
%preun
# before erase, stop service
[ $1 -eq 0 ] || exit 0
%{l_rc} dcron stop 2>/dev/null
exit 0

9
dcron/rc.dcron

@ -23,10 +23,19 @@
%start -u @l_susr@
rcService dcron enable yes || exit 0
rcService dcron active yes && exit 0
@l_prefix@/sbin/crond
%stop -u @l_susr@
rcService dcron enable yes || exit 0
rcService dcron active no && exit 0
dcron_signal TERM
rm -f @l_prefix@/var/dcron/dcron.pid 2>/dev/null || true
%restart -u @l_susr@
rcService dcron enable yes || exit 0
rcService dcron active no && exit 0
rc dcron stop
sleep 2
rc dcron start

Loading…
Cancel
Save