Add cronjob to update pacman mirror list
Resolves #10 Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
ca6e28b8e5
commit
4d3e042a16
2 changed files with 20 additions and 0 deletions
1
install
1
install
|
@ -164,6 +164,7 @@ CHROMIUM_EXTENSIONS=(
|
||||||
# Root files which should be copied
|
# Root files which should be copied
|
||||||
declare -A COPY_ROOT_FILES
|
declare -A COPY_ROOT_FILES
|
||||||
COPY_ROOT_FILES=(
|
COPY_ROOT_FILES=(
|
||||||
|
["/etc/cron.daily/update-mirror"]="755"
|
||||||
["/etc/docker/daemon.json"]="644"
|
["/etc/docker/daemon.json"]="644"
|
||||||
["/etc/gemrc"]="644"
|
["/etc/gemrc"]="644"
|
||||||
["/etc/logrotate.d/custom.conf"]="644"
|
["/etc/logrotate.d/custom.conf"]="644"
|
||||||
|
|
19
system/etc/cron.daily/update-mirror
Normal file
19
system/etc/cron.daily/update-mirror
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# SCRIPT NAME:
|
||||||
|
# update-mirror
|
||||||
|
#
|
||||||
|
# AUTHOR:
|
||||||
|
# Severin Kaderli <severin@kaderli.dev>
|
||||||
|
#
|
||||||
|
# DESCRIPTION:
|
||||||
|
# Updates pacman mirror list using reflector
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# ./update-mirror
|
||||||
|
. /home/severin/.local/bin/utils
|
||||||
|
|
||||||
|
{
|
||||||
|
print_time_log "update-mirror" "Update pacman mirror list"
|
||||||
|
reflector --country Switzerland --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
|
||||||
|
} >> /home/severin/.local/log/cron.log 2>&1
|
Loading…
Add table
Add a link
Reference in a new issue