koji-gc: add systemd unit files
This commit is contained in:
parent
2a8505e461
commit
25d7970c54
4 changed files with 21 additions and 0 deletions
|
|
@ -594,6 +594,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%files utils
|
||||
%{_sbindir}/kojira
|
||||
%if %{use_systemd}
|
||||
%{_unitdir}/koji-gc.service
|
||||
%{_unitdir}/koji-gc.timer
|
||||
%{_unitdir}/kojira.service
|
||||
%else
|
||||
%{_initrddir}/kojira
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ _install:
|
|||
install-systemd: _install
|
||||
mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
|
||||
install -p -m 644 kojira.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
|
||||
install -p -m 644 koji-gc.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
|
||||
install -p -m 644 koji-gc.timer $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
|
||||
install -p -m 644 koji-sweep-db.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
|
||||
install -p -m 644 koji-sweep-db.timer $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
|
||||
|
||||
|
|
|
|||
7
util/koji-gc.service
Normal file
7
util/koji-gc.service
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=Koji garbage collection
|
||||
Documentation=https://docs.pagure.org/koji/utils/
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/koji-gc --lock-file=/var/lock/koji-gc.lock --exit-on-lock
|
||||
10
util/koji-gc.timer
Normal file
10
util/koji-gc.timer
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Daily Koji garbage collection
|
||||
Documentation=https://docs.pagure.org/koji/utils/
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue