openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
818 stars 251 forks source link

enable zram sync #1858

Closed mstormi closed 3 months ago

mstormi commented 3 months ago

run

SERVICE=1 /usr/local/sbin/zram-config sync

at regular intervals, e.g. through (ATTN: check if env var is passed !)

admin@mysmarthouse:/etc/systemd/system $ cat zsync.service
[Unit]
Description=Perform nightly zram sync to persistent storage
After=zram-config.service
Wants=zsync.timer
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/zram-config "sync"
admin@mysmarthouse:/etc/systemd/system $ cat zsync.timer
[Unit]
Description=Perform nightly zram sync to persistent storage

[Timer]
Unit=zsync.service
OnCalendar=*-*-* 00:55
RandomizedDelaySec=10m
Persistent=true

[Install]
WantedBy=timers.target
mstormi commented 3 months ago

added