mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-21 14:31:02 +02:00
app-emulation/rkt: add gc timer
This commit is contained in:
parent
b65b19b41b
commit
d2b8f39c76
7
sdk_container/src/third_party/coreos-overlay/app-emulation/rkt/files/rkt-gc.service
vendored
Normal file
7
sdk_container/src/third_party/coreos-overlay/app-emulation/rkt/files/rkt-gc.service
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Garbage Collection for rkt
|
||||
|
||||
[Service]
|
||||
Environment=GRACE_PERIOD=1d
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/rkt gc --grace-period=$GRACE_PERIOD
|
9
sdk_container/src/third_party/coreos-overlay/app-emulation/rkt/files/rkt-gc.timer
vendored
Normal file
9
sdk_container/src/third_party/coreos-overlay/app-emulation/rkt/files/rkt-gc.timer
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Periodic Garbage Collection for rkt
|
||||
|
||||
[Timer]
|
||||
OnActiveSec=0s
|
||||
OnUnitActiveSec=12h
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -5,7 +5,7 @@ EAPI=5
|
||||
CROS_WORKON_PROJECT="coreos/rkt"
|
||||
CROS_WORKON_LOCALNAME="rkt"
|
||||
CROS_WORKON_REPO="git://github.com"
|
||||
inherit cros-workon
|
||||
inherit cros-workon systemd
|
||||
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
KEYWORDS="~amd64"
|
||||
@ -51,4 +51,7 @@ src_install() {
|
||||
|
||||
insinto /usr/share/rkt
|
||||
doins "${S}/bin/stage1.aci"
|
||||
|
||||
systemd_dounit "${FILESDIR}"/${PN}-gc.service
|
||||
systemd_dounit "${FILESDIR}"/${PN}-gc.timer
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user