Add cronie

This commit is contained in:
Manuel 2013-05-26 17:41:45 +00:00
parent 40957950e2
commit d4b377b95a
4 changed files with 90 additions and 0 deletions

68
cronie/PKGBUILD Normal file
View File

@ -0,0 +1,68 @@
pkgname="cronie"
pkgver=1.4.9
pkgrel=4
pkgdesc='Daemon that runs specified programs at scheduled times and related tools'
url='https://fedorahosted.org/cronie/'
license=('custom:BSD')
arch=('x86_64')
depends=('pam' 'bash' 'run-parts')
optdepends=('pm-utils: defer anacron on battery power'
'smtp-server: send job output via email'
'smtp-forwarder: forward job output to email server')
source=("https://fedorahosted.org/releases/c/r/${pkgname}/${pkgname}-${pkgver}.tar.gz"
'cron.deny'
'service'
'pam.d')
sha1sums=('40405cb30b62bd60323e4daf5198f26f0e65c4c4'
'0f279b8fb820340267d578dc85511c980715f91e'
'de455f11a310e64d6930390e57726ed70f3295d0'
'5eff7fb31f6bc0a924243ff046704726cf20c221')
backup=('etc/anacrontab'
'etc/pam.d/crond'
'etc/cron.deny')
conflicts=('cron')
provides=('cron')
groups=('base')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
sed 's:usr/sbin:usr/bin:g' -i contrib/0anacron
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--sbindir=/usr/bin \
--enable-anacron \
--with-inotify \
--with-pam \
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
chmod u+s "${pkgdir}"/usr/bin/crontab
install -d "${pkgdir}"/var/spool/{ana,}cron
install -d "${pkgdir}"/etc/cron.{d,hourly,daily,weekly,monthly}
install -Dm644 ../pam.d "${pkgdir}"/etc/pam.d/crond
install -Dm644 ../cron.deny "${pkgdir}"/etc/cron.deny
install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/cronie.service
install -Dm644 contrib/anacrontab "${pkgdir}"/etc/anacrontab
install -Dm644 contrib/0hourly "${pkgdir}"/etc/cron.d/0hourly
install -Dm755 contrib/0anacron "${pkgdir}"/etc/cron.hourly/0anacron
install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/cronie/COPYING
}

1
cronie/cron.deny Normal file
View File

@ -0,0 +1 @@
# without this file, only users listed in /etc/cron.allow can use crontab

10
cronie/pam.d Normal file
View File

@ -0,0 +1,10 @@
auth required pam_unix.so
auth required pam_env.so
account required pam_access.so
account required pam_unix.so
account required pam_time.so
session required pam_loginuid.so
session required pam_limits.so
session required pam_unix.so

11
cronie/service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Periodic Command Scheduler
[Service]
ExecStart=/usr/bin/crond -n
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
[Install]
WantedBy=multi-user.target