Add update download timer for Moria
This commit is contained in:
parent
b23b617b95
commit
01f4b0694f
4 changed files with 29 additions and 1 deletions
|
@ -86,6 +86,14 @@ src = "etc/pacman.conf"
|
|||
dst = "/etc/pacman.d/hooks/zsh.hook"
|
||||
src = "etc/pacman.d/hooks/zsh.hook"
|
||||
|
||||
[dotfiles."f_pacman-download.service"]
|
||||
dst = "/etc/systemd/system/pacman-download.service"
|
||||
src = "etc/systemd/system/pacman-download.service"
|
||||
|
||||
[dotfiles."f_pacman-download.timer"]
|
||||
dst = "/etc/systemd/system/pacman-download.timer"
|
||||
src = "etc/systemd/system/pacman-download.timer"
|
||||
|
||||
[dotfiles."f_plymouthd.conf"]
|
||||
src = "etc/plymouth/plymouthd.conf"
|
||||
dst = "/etc/plymouth/plymouthd.conf"
|
||||
|
@ -177,6 +185,8 @@ dotfiles = [
|
|||
"f_pacman_zsh_hook",
|
||||
"f_pacserve.service.conf",
|
||||
"f_sudoers_pacman",
|
||||
"f_pacman-download.service",
|
||||
"f_pacman-download.timer",
|
||||
]
|
||||
|
||||
[profiles.Mirkwood]
|
||||
|
|
|
@ -197,7 +197,7 @@ update() {
|
|||
|
||||
packages() {
|
||||
{%@@ if distro_id == "arch" @@%}
|
||||
paru -Syu --noconfirm
|
||||
paru -S{%@@ if profile != "Moria" @@%}y{%@@ endif @@%}u --noconfirm
|
||||
{%@@ elif distro_id == "ubuntu" or distro_id == "debian" @@%}
|
||||
doas apt update && doas apt full-upgrade -y && doas apt autoremove -y && doas apt autoclean -y
|
||||
{%@@ elif distro_id == "termux" @@%}
|
||||
|
|
8
root/etc/systemd/system/pacman-download.service
Executable file
8
root/etc/systemd/system/pacman-download.service
Executable file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Download updates with pacman
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=pacman -Syuw --noconfirm
|
10
root/etc/systemd/system/pacman-download.timer
Normal file
10
root/etc/systemd/system/pacman-download.timer
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Hourly pacman update download with random minute
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
RandomizedDelaySec=3600
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Add table
Add a link
Reference in a new issue