Skip to content

Commit e9a041d

Browse files
committed
repo-refresh: new
1 parent 8ac7bf1 commit e9a041d

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

repo-refresh/repo-refresh.service

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[Unit]
2+
Description=Check for package update
3+
ConditionACPower=true
4+
5+
[Service]
6+
Type=oneshot
7+
ExecStart=/usr/libexec/repo-refresh.sh

repo-refresh/repo-refresh.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
if command -v oma > /dev/null; then
4+
oma refresh --no-progress
5+
else
6+
apt update
7+
fi

repo-refresh/repo-refresh.timer

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Unit]
2+
Description=Check for package updates
3+
4+
[Timer]
5+
OnCalendar=*-*-* 6,18:00
6+
RandomizedDelaySec=12h
7+
AccuracySec=1h
8+
Persistent=true
9+
10+
[Install]
11+
WantedBy=timers.target

0 commit comments

Comments
 (0)