ship example crontab and systemd timer units as %doc
This commit is contained in:
parent
ec40012cb9
commit
412ba2eacf
4
rear.cron
Normal file
4
rear.cron
Normal file
@ -0,0 +1,4 @@
|
||||
# cronjob for ReaR
|
||||
# periodically check if disk layout has changed and update
|
||||
# the rescue image
|
||||
30 1 * * * root /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue
|
6
rear.service
Normal file
6
rear.service
Normal file
@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Update ReaR rescue image
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/rear checklayout || /usr/sbin/rear mkrescue
|
@ -10,6 +10,10 @@ License: GPLv3
|
||||
|
||||
# as GitHub stopped with download section we need to go back to Sourceforge for downloads
|
||||
Source0: https://sourceforge.net/projects/rear/files/rear/%{version}/rear-%{version}.tar.gz
|
||||
# Add cronjob and systemd timer as documentation
|
||||
Source1: rear.cron
|
||||
Source2: rear.service
|
||||
Source3: rear.timer
|
||||
# Skip buildin modules, RHBZ#1831311
|
||||
Patch0: 0001-skip-kernel-buildin-modules.patch
|
||||
|
||||
@ -96,11 +100,16 @@ make doc
|
||||
|
||||
%install
|
||||
%{make_install}
|
||||
install -p -d %{buildroot}%{_docdir}/%{name}/
|
||||
install -m 0644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}/
|
||||
install -m 0644 %{SOURCE2} %{buildroot}%{_docdir}/%{name}/
|
||||
install -m 0644 %{SOURCE3} %{buildroot}%{_docdir}/%{name}/
|
||||
|
||||
#-- FILES ---------------------------------------------------------------------#
|
||||
%files
|
||||
%doc MAINTAINERS COPYING README.adoc doc/*.txt doc/user-guide/*.html
|
||||
%doc %{_mandir}/man8/rear.8*
|
||||
%doc %{_docdir}/%{name}/rear.*
|
||||
%config(noreplace) %{_sysconfdir}/rear/
|
||||
%{_datadir}/rear/
|
||||
%{_sharedstatedir}/rear/
|
||||
|
10
rear.timer
Normal file
10
rear.timer
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Update ReaR rescue image
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
RandomizedDelaySec=1h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Reference in New Issue
Block a user