############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = cronie version = 1.6.1 release = 1 groups = System/Environment/Base url = https://github.com/cronie-crond/cronie license = MIT and BSD and ISC and GPLv2 summary = Cron daemon for executing programs at set times description Cronie contains the standard UNIX daemon crond that runs specified programs at scheduled times and related tools. It is a fork of the original vixie-cron and has security and configuration enhancements like the ability to use pam and SELinux. end source_dl = https://github.com/cronie-crond/cronie/releases/download/%{thisapp}/ build requires bison libcap-devel libedit-devel pam-devel readline-devel systemd-units texinfo end configure_options += \ --with-pam \ --with-inotify \ --enable-anacron \ --enable-pie \ --enable-relro test # Cronie does not provide any kind of testsuite. end install_cmds mkdir -pv %{BUILDROOT}%{localstatedir}/spool/{ana,}cron mkdir -pv %{BUILDROOT}%{sysconfdir}/cron.d touch %{BUILDROOT}%{sysconfdir}/cron.deny # Install anacron install -m 644 contrib/anacrontab %{BUILDROOT}%{sysconfdir}/anacrontab mkdir -pv %{BUILDROOT}%{sysconfdir}/cron.hourly install -c -m 755 contrib/0anacron %{BUILDROOT}%{sysconfdir}/cron.hourly/0anacron for i in daily weekly monthly; do touch %{BUILDROOT}%{localstatedir}/spool/anacron/cron.${i} done install -c -m 755 contrib/0hourly %{BUILDROOT}%{sysconfdir}/cron.d/0hourly end end packages package %{name} requires dailyjobs end # Just search for new unit files that were just installed. script postin systemctl daemon-reload >/dev/null 2>&1 || : # Enable cronie on startup. systemctl enable cronie.service >/dev/null 2>&1 || : end # Disable the service that is to be removed and stop it if it is still running. script preun systemctl --no-reload disable cronie.service >/dev/null 2>&1 || : systemctl stop cronie.service >/dev/null 2>&1 || : end # Just tell systemd that unitfiles have been removed. script postun systemctl daemon-reload >/dev/null 2>&1 || : end # Try to restart the service if it is running. script postup systemctl daemon-reload >/dev/null 2>&1 || : systemctl try-restart cronie.service >/dev/null 2>&1 || : end end package anacron summary = Utility for running regular jobs. description Anacron is part of cronie that is used for running jobs with regular periodicity which do not have exact time of day of execution. The default settings of anacron execute the daily, weekly, and monthly jobs, but anacron allows setting arbitrary periodicity of jobs. Using anacron allows running the periodic jobs even if the system is often powered off and it also allows randomizing the time of the job execution for better utilization of resources shared among multiple systems. end groups = System/Base Base provides dailyjobs end requires cronie = %{thisver} crontabs end files %{sbindir}/anacron %{sysconfdir}/cron.hourly/0anacron %{sysconfdir}/anacrontab %{localstatedir}/spool/anacron %{mandir}/man*/anacron* end configfiles %{sysconfdir}/anacrontab end datafiles %{localstatedir}/spool/anacron/* end end package %{name}-debuginfo template DEBUGINFO end end