diff --git a/srcpkgs/cronie/files/crond.pam b/srcpkgs/cronie/files/crond.pam index 3b0eefd7397..348baa70a68 100644 --- a/srcpkgs/cronie/files/crond.pam +++ b/srcpkgs/cronie/files/crond.pam @@ -1,7 +1,10 @@ -# -# The PAM configuration file for the cron daemon -# -auth required pam_unix.so nullok_secure use_first_pass -account required pam_unix.so -session required pam_unix.so -session required pam_limits.so +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 diff --git a/srcpkgs/cronie/files/crond.rc b/srcpkgs/cronie/files/crond.rc deleted file mode 100644 index fb32b750f8a..00000000000 --- a/srcpkgs/cronie/files/crond.rc +++ /dev/null @@ -1,23 +0,0 @@ -#!/sbin/runscript - -command=/usr/sbin/crond -pidfile=/var/run/crond.pid -extra_commands="reload" - -depend() -{ - need localmount - after bootmisc -} - -reload() -{ - if [ ! -f "${pidfile}" ]; then - eerror "crond not running" - return 1 - fi - ebegin "Reloading configuration and re-opening log file" - start-stop-daemon --stop --oknodo --signal HUP \ - --pidfile "${pidfile}" - eend $? -} diff --git a/srcpkgs/cronie/files/cronie.service b/srcpkgs/cronie/files/cronie.service new file mode 100644 index 00000000000..5ae193bfcc7 --- /dev/null +++ b/srcpkgs/cronie/files/cronie.service @@ -0,0 +1,10 @@ +[Unit] +Description=Periodic Command Scheduler + +[Service] +ExecStart=/usr/sbin/crond -n +ExecReload=/bin/kill -HUP $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/cronie/template b/srcpkgs/cronie/template index 5bb7912f97e..d805b86d0ca 100644 --- a/srcpkgs/cronie/template +++ b/srcpkgs/cronie/template @@ -1,16 +1,15 @@ # Template file for 'cronie' pkgname=cronie -version=1.4.7 +version=1.4.8 distfiles="https://fedorahosted.org/releases/c/r/cronie/cronie-$version.tar.gz" build_style=gnu_configure configure_args="--with-inotify --without-selinux --with-pam --disable-anacron ---with-daemon_username=nobody --with-daemon_groupname=nobody --localstatedir=/var" short_desc="Runs specified programs at scheduled times" maintainer="Juan RP " homepage="https://fedorahosted.org/cronie/" license="BSD" -checksum=83bae15ae5504454ba74f4142f5db3aa22be594327fea19d2534f65803137fbd +checksum=a3b910876f255712f1a5c364b74f34b0ceac9f6f3bbc45e854c5722785f513b3 long_desc=" Cronie contains the standard UNIX daemon crond that runs specified programs at scheduled times and related tools. It is based on the original cron and @@ -18,8 +17,8 @@ long_desc=" SELinux." keep_empty_dirs=yes -conf_files="/etc/crontab" -openrc_services="crond default true" +conf_files="/etc/crontab /etc/pam.d/crond /etc/cron.deny" +systemd_services="cronie.service" provides="cron-daemon-0" replaces="cron-daemon>=0" @@ -30,17 +29,19 @@ Add_dependency build pam-devel post_install() { - install -d ${DESTDIR}/etc/cron.d ${DESTDIR}/etc/cron.hourly \ - ${DESTDIR}/etc/cron.daily ${DESTDIR}/etc/cron.weekly \ - ${DESTDIR}/etc/cron.monthly ${DESTDIR}/etc/logrotate.d - install -d -m755 ${DESTDIR}/var/spool/cron + vmkdir etc/cron.d + vmkdir etc/cron.hourly + vmkdir etc/cron.daily + vmkdir etc/cron.weekly + vmkdir etc/cron.monthly + vmkdir etc/logrotate.d + vmkdir var/spool/cron - install -D -m755 ${FILESDIR}/crond.rc ${DESTDIR}/etc/init.d/crond - install -m644 ${FILESDIR}/crontab ${DESTDIR}/etc/crontab - install -m644 ${FILESDIR}/crond.logrotate \ - ${DESTDIR}/etc/logrotate.d/crond - rm -vf ${DESTDIR}/etc/pam.d/crond - install -D -m644 ${FILESDIR}/crond.pam ${DESTDIR}/etc/pam.d/crond + vinstall ${FILESDIR}/cronie.service 644 lib/systemd/system + vinstall ${FILESDIR}/crontab 644 etc + vinstall ${FILESDIR}/crond.logrotate 644 etc/logrotate.d crond + rm -f ${DESTDIR}/etc/pam.d/crond + vinstall ${FILESDIR}/crond.pam 644 etc/pam.d crond # Add /etc/cron.deny empty, to allow all users. touch ${DESTDIR}/etc/cron.deny