summaryrefslogtreecommitdiffstats
path: root/abs/core/dcron
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2014-04-16 21:05:49 (GMT)
committerBritney Fransen <brfransen@gmail.com>2014-04-16 21:05:49 (GMT)
commit2e362cac2506ccf479fe3133edcb41359da33115 (patch)
tree86fd0c135f54bfc26f6f81569f8aaaee404cda29 /abs/core/dcron
parente663ac7ad184f870e081d1e9e88d50085b6d0ce2 (diff)
downloadlinhes_pkgbuild-2e362cac2506ccf479fe3133edcb41359da33115.zip
linhes_pkgbuild-2e362cac2506ccf479fe3133edcb41359da33115.tar.gz
linhes_pkgbuild-2e362cac2506ccf479fe3133edcb41359da33115.tar.bz2
dcron: refs #961
Diffstat (limited to 'abs/core/dcron')
-rw-r--r--abs/core/dcron/PKGBUILD72
-rw-r--r--abs/core/dcron/dcron.install4
-rw-r--r--abs/core/dcron/service11
3 files changed, 52 insertions, 35 deletions
diff --git a/abs/core/dcron/PKGBUILD b/abs/core/dcron/PKGBUILD
index 5a0b4a8..bcbb3f3 100644
--- a/abs/core/dcron/PKGBUILD
+++ b/abs/core/dcron/PKGBUILD
@@ -1,47 +1,53 @@
-# Maintainer: Paul Mattal <paul.archlinux.org>
+# Maintainer: notfoss <AT> gmx.com
+# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+# Contributor: Paul Mattal <paul.archlinux.org>
pkgname=dcron
pkgver=4.5
-pkgrel=4
+pkgrel=5
pkgdesc="dillon's lightweight cron daemon"
-arch=('i686' 'x86_64')
-license=('GPL')
-url="http://www.jimpryor.net/linux/dcron"
-backup=('var/spool/cron/root' 'etc/conf.d/crond')
-depends=('bash' 'postfix')
-provides=('cron')
-conflicts=('cron')
-source=("http://www.jimpryor.net/linux/releases/${pkgname}-${pkgver}.tar.gz")
-optdepends=('smtp-server: sending cron job output via email')
+arch=("i686" "x86_64")
+license=("GPL")
+url="http://www.jimpryor.net/linux/dcron.html"
+backup=("var/spool/cron/root" "etc/conf.d/crond")
+depends=("bash" "postfix")
+optdepends=("msmtp-mta: sending cron job output via email")
+provides=("cron")
+conflicts=("cron")
install=$pkgname.install
+source=("http://www.jimpryor.net/linux/releases/${pkgname}-${pkgver}.tar.gz"
+ "service")
+md5sums=("078833f3281f96944fc30392b1888326"
+ "2eefc422db24bf2ac38e3a16292ccdc4")
build() {
- cd "$srcdir/${pkgname}-${pkgver}"
+ cd "$srcdir/${pkgname}-${pkgver}"
- # by default, any member of group "users" can edit their own crontab
- make \
- PREFIX=/usr \
- CRONTAB_GROUP=users \
- CRONTABS=/var/spool/cron \
- CRONSTAMPS=/var/spool/cronstamps
+ # fix paths to point to /usr/bin
+ sed -i 's=/usr/sbin/sendmail=/usr/bin/sendmail=g' defs.h
+ sed -i 's=/usr/sbin/run-cron=/usr/bin/run-cron=g' extra/root.crontab
+
+ # by default, any member of group "users" can edit their own crontab
+ make \
+ PREFIX=/usr \
+ SBINDIR=/usr/bin \
+ CRONTAB_GROUP=users \
+ CRONTABS=/var/spool/cron \
+ CRONSTAMPS=/var/spool/cronstamps
}
package() {
- cd "$srcdir/${pkgname}-${pkgver}"
- make DESTDIR="$pkgdir" install
+ cd "$srcdir/${pkgname}-${pkgver}"
+ make DESTDIR="$pkgdir" install
- # install standard configuration and scripts
- install -d -m755 "$pkgdir/etc/cron."{hourly,daily,weekly,monthly}
+ # install standard configuration and scripts
+ install -d -m755 "$pkgdir"/etc/cron.{hourly,daily,weekly,monthly}
- install -D -m755 extra/run-cron "$pkgdir/usr/sbin/run-cron"
- install -D -m0600 extra/root.crontab "$pkgdir/var/spool/cron/root"
- install -D -m755 extra/crond.rc "$pkgdir/etc/rc.d/crond"
- install -D -m0644 extra/crond.conf "$pkgdir/etc/conf.d/crond"
- install -D -m644 extra/crontab.vim "$pkgdir/usr/share/vim/vimfiles/ftplugin/crontab.vim"
- sed -i -e 's=/var/spool/cron/cronstamps=/var/spool/cronstamps=' extra/prune-cronstamps
- install -D -m755 extra/prune-cronstamps "$pkgdir/etc/cron.d/prune-cronstamps"
- #mv sbin->bin
- mv $pkgdir/usr/sbin/* $pkgdir/usr/bin
- rmdir $pkgdir/usr/sbin
+ install -D -m755 extra/run-cron "$pkgdir"/usr/bin/run-cron
+ install -D -m0600 extra/root.crontab "$pkgdir"/var/spool/cron/root
+ install -D -m0644 extra/crond.conf "$pkgdir"/etc/conf.d/crond
+ install -D -m644 extra/crontab.vim "$pkgdir"/usr/share/vim/vimfiles/ftplugin/crontab.vim
+ sed -i -e 's=/var/spool/cron/cronstamps=/var/spool/cronstamps=' extra/prune-cronstamps
+ install -D -m755 extra/prune-cronstamps "$pkgdir"/etc/cron.d/prune-cronstamps
+ install -Dm644 "$srcdir"/service "$pkgdir"/usr/lib/systemd/system/dcron.service
}
-md5sums=('078833f3281f96944fc30392b1888326')
diff --git a/abs/core/dcron/dcron.install b/abs/core/dcron/dcron.install
index fb01dc9..ad5442a 100644
--- a/abs/core/dcron/dcron.install
+++ b/abs/core/dcron/dcron.install
@@ -8,13 +8,13 @@ post_upgrade() {
grep -q cron.tenminutes /var/spool/cron/root
if [ $? = 1 ]
then
- echo "0,10,20,30,40,50 * * * * /usr/sbin/run-cron /etc/cron.tenminutes" >> /var/spool/cron/root
+ echo "0,10,20,30,40,50 * * * * /usr/bin/run-cron /etc/cron.tenminutes" >> /var/spool/cron/root
fi
if [ ! -e /etc/cron.tenminutes ]
then
mkdir -p /etc/cron.tenminutes
fi
-
+ sed -i 's|/usr/sbin|/usr/bin|g' /var/spool/cron/root
}
post_install() {
diff --git a/abs/core/dcron/service b/abs/core/dcron/service
new file mode 100644
index 0000000..703f320
--- /dev/null
+++ b/abs/core/dcron/service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Periodic Command Scheduler
+
+[Service]
+Type=forking
+EnvironmentFile=/etc/conf.d/crond
+ExecStart=/usr/bin/crond $CROND_ARGS
+Restart=always
+
+[Install]
+WantedBy=multi-user.target