summaryrefslogtreecommitdiff
path: root/core/cronie
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-05-05 19:02:44 +0000
committerroot <root@rshg047.dnsready.net>2011-05-05 19:02:44 +0000
commitef61aa5a9cead170fa18dba44609c32bbf18306a (patch)
tree82af53ec1018f58868b80cdf680a9c4ec5df1538 /core/cronie
parentab1410d33401cf1fc4a384bb0b2d9901c8fe8d14 (diff)
Thu May 5 19:02:44 UTC 2011
Diffstat (limited to 'core/cronie')
-rw-r--r--core/cronie/PKGBUILD67
-rw-r--r--core/cronie/cron.deny1
-rw-r--r--core/cronie/crontab1
-rw-r--r--core/cronie/pam.d7
-rwxr-xr-xcore/cronie/rc.d38
5 files changed, 114 insertions, 0 deletions
diff --git a/core/cronie/PKGBUILD b/core/cronie/PKGBUILD
new file mode 100644
index 000000000..15d70051a
--- /dev/null
+++ b/core/cronie/PKGBUILD
@@ -0,0 +1,67 @@
+# Contributor: Kaiting Chen <kaiting.chen@kiwilight.com>
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+
+pkgname='cronie'
+pkgver=1.4.7
+pkgrel=7
+pkgdesc='Daemon that runs specified programs at scheduled times and related tools'
+url='https://fedorahosted.org/cronie/'
+license=('custom:BSD')
+arch=('i686' 'x86_64')
+depends=('pam' 'bash' 'run-parts')
+
+source=("https://fedorahosted.org/releases/c/r/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'cron.deny'
+ 'crontab'
+ 'pam.d'
+ 'rc.d')
+sha1sums=('c6644ba0e58bcb14e0bb3f925e3e8cc3f0d47a7f'
+ '0f279b8fb820340267d578dc85511c980715f91e'
+ '4059bc4ccb75f08b0d4970940799e5d9722b339f'
+ '6d8aef6880935b3dcc3e28481111d036544eeae5'
+ 'c08c040ed5cb12bc4fd15639a5242d31ec247ef5')
+
+backup=('etc/crontab'
+ 'etc/anacrontab'
+ 'etc/conf.d/crond'
+ 'etc/pam.d/crond'
+ 'etc/cron.deny')
+
+conflicts=('cron')
+provides=('cron')
+groups=('base')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --enable-anacron \
+ --with-inotify \
+ --with-pam \
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+
+ install -d "${pkgdir}"/etc/cron.{d,hourly,daily,weekly,monthly}
+ install -d "${pkgdir}"/var/spool/{ana,}cron
+ chmod u+s "${pkgdir}"/usr/bin/crontab
+
+ install -Dm755 ../rc.d "${pkgdir}"/etc/rc.d/crond
+ install -Dm644 ../pam.d "${pkgdir}"/etc/pam.d/crond
+ install -Dm644 ../crontab "${pkgdir}"/etc/crontab
+ install -Dm644 ../cron.deny "${pkgdir}"/etc/cron.deny
+ install -Dm644 crond.sysconfig "${pkgdir}"/etc/conf.d/crond
+ install -Dm644 contrib/0hourly "${pkgdir}"/etc/cron.d/0hourly
+ install -Dm755 contrib/0anacron "${pkgdir}"/etc/cron.hourly/0anacron
+ install -Dm644 contrib/anacrontab "${pkgdir}"/etc/anacrontab
+
+ install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/cronie/COPYING
+}
diff --git a/core/cronie/cron.deny b/core/cronie/cron.deny
new file mode 100644
index 000000000..06e685cc8
--- /dev/null
+++ b/core/cronie/cron.deny
@@ -0,0 +1 @@
+# without this file, only users listed in /etc/cron.allow can use crontab
diff --git a/core/cronie/crontab b/core/cronie/crontab
new file mode 100644
index 000000000..f2ce71030
--- /dev/null
+++ b/core/cronie/crontab
@@ -0,0 +1 @@
+# without this file, crond disables inotify support at startup
diff --git a/core/cronie/pam.d b/core/cronie/pam.d
new file mode 100644
index 000000000..094051b5e
--- /dev/null
+++ b/core/cronie/pam.d
@@ -0,0 +1,7 @@
+account required pam_access.so
+account required pam_time.so
+account required pam_unix.so
+
+session required pam_limits.so
+session required pam_env.so
+session required pam_unix.so
diff --git a/core/cronie/rc.d b/core/cronie/rc.d
new file mode 100755
index 000000000..d0659685c
--- /dev/null
+++ b/core/cronie/rc.d
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+name=crond
+. /etc/conf.d/crond
+PID=$(pidof -o %PPID /usr/sbin/crond)
+
+case "$1" in
+start)
+ stat_busy "Starting $name daemon"
+ [[ -z "$PID" ]] && /usr/sbin/crond $CRONDARGS &>/dev/null \
+ && { add_daemon $name; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+stop)
+ stat_busy "Stopping $name daemon"
+ [[ -n "$PID" ]] && kill $PID &>/dev/null \
+ && { rm_daemon $name; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+reload)
+ stat_busy "Reloading $name daemon"
+ [[ -n "$PID" ]] && kill -HUP $PID &>/dev/null \
+ && { stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+*)
+ echo "usage: $0 {start|stop|restart|reload}"
+ ;;
+esac
+exit 0