-
-
Save ysl2/ed836ef575548ebe209989f7f6dde50d to your computer and use it in GitHub Desktop.
Arch Linux Pacman auto download updated packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download new packages but don't install them | |
# Save in /etc/systemd/system/ | |
[Unit] | |
Description=Pacman Automatic Download (no install) service | |
After=network-online.target | |
[Service] | |
# Wait time if process hangs | |
TimeoutStopSec=5m | |
# Command to run | |
ExecStart=/usr/bin/pacman --sync --refresh --sysupgrade --downloadonly --noconfirm | |
Type=simple | |
KillMode=process | |
KillSignal=SIGINT | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Timer which runs service | |
# Save in /etc/systemd/system/ | |
# Enable: | |
# systemctl enable /etc/systemd/system/pacman-auto-update.timer | |
# Start: | |
# systemctl start pacman-auto-update.timer | |
# Next run time: | |
# systemctl list-timers --all | |
[Unit] | |
Description=Pacman Automatic Download (no install) timer | |
[Timer] | |
# Uptime after it's ran | |
OnBootSec=60min | |
# Wait time for next run | |
OnUnitInactiveSec=120min | |
Unit=pacman-auto-update.service | |
Persistent=true | |
RandomizedDelaySec=5min | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment