Use reflector timer
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
76579164a9
commit
5fb4aeeab7
4 changed files with 19 additions and 32 deletions
|
@ -11,7 +11,6 @@
|
|||
|
||||
declare -A CONFIG_ETC_FILES
|
||||
CONFIG_ETC_FILES=(
|
||||
["/etc/cron.daily/update-mirror"]="755"
|
||||
["/etc/default/tlp"]="644"
|
||||
["/etc/docker/daemon.json"]="644"
|
||||
["/etc/gemrc"]="644"
|
||||
|
@ -31,6 +30,7 @@ CONFIG_ETC_FILES=(
|
|||
["/etc/sysctl.d/99-sysctl.conf"]="644"
|
||||
["/etc/bluetooth/main.conf"]="644"
|
||||
["/etc/modprobe.d/hid_apple.conf"]="644"
|
||||
["/etc/xdg/reflector/reflector.conf"]="644"
|
||||
)
|
||||
|
||||
output::section "Copying /etc files"
|
||||
|
|
|
@ -10,17 +10,18 @@
|
|||
# Copies custom systemd services and enables needed services.
|
||||
|
||||
CONFIG_SYSTEMD_SERVICES=(
|
||||
"acpid"
|
||||
"bluetooth"
|
||||
"cronie"
|
||||
"docker"
|
||||
"NetworkManager"
|
||||
"org.cups.cupsd"
|
||||
"acpid.service"
|
||||
"bluetooth.service"
|
||||
"cronie.service"
|
||||
"docker.service"
|
||||
"NetworkManager.service"
|
||||
"org.cups.cupsd.service"
|
||||
"pkgstats.timer"
|
||||
"suspend"
|
||||
"systemd-timesyncd"
|
||||
"tlp"
|
||||
"upower"
|
||||
"reflector.timer"
|
||||
"suspend.service"
|
||||
"systemd-timesyncd.service"
|
||||
"tlp.service"
|
||||
"upower.service"
|
||||
)
|
||||
|
||||
CONFIG_SYSTEMD_USER_SERVICES=()
|
||||
|
@ -36,7 +37,7 @@ output::success "Successfully copied systemd services"
|
|||
output::section "Enabling systemd services"
|
||||
for service in "${CONFIG_SYSTEMD_SERVICES[@]}"; do
|
||||
output::log "Enabling service ${YELLOW}${service}${DEFAULT}"
|
||||
sudo systemctl enable "${service}" |& output::debug
|
||||
sudo systemctl enable --now "${service}" |& output::debug
|
||||
done
|
||||
|
||||
for service in "${CONFIG_SYSTEMD_USER_SERVICES[@]}"; do
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#!/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
|
5
system/etc/xdg/reflector/reflector.conf
Normal file
5
system/etc/xdg/reflector/reflector.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
--save /etc/pacman.d/mirrorlist
|
||||
--country Switzerland
|
||||
--age 12
|
||||
--protocol https
|
||||
--sort rate
|
Loading…
Add table
Add a link
Reference in a new issue