[Unit] Description=Monthly mirror update – Timeshift backup then GhostMirror refresh Documentation=https://github.com/vbextreme/ghostmirror After=network-online.target Wants=network-online.target [Service] Type=oneshot # Step 1: Timeshift RSYNC snapshot before touching anything ExecStart=/bin/sh -c '/usr/bin/timeshift --create --rsync \ --comments "pre-ghostmirror monthly mirror update $(date +%%Y-%%m-%%d %%H:%%M:%%S)" \ --scripted' # Step 2: Fetch & rank mirror pool # -c countries: Switzerland (primary), Germany, Italy + Austria, France, Netherlands # -L 30 candidates # -S drop errored mirrors, prefer synced + fresh + nearest ExecStart=/usr/bin/ghostmirror \ -P -o \ -c Switzerland,Germany,Italy,Austria,France,Netherlands \ -l /etc/pacman.d/mirrorlist \ -L 30 \ -S state,outofdate,morerecent,ping # Step 3: Speed-test candidates, write final top 10 to mirrorlist # -m use the file from step 2 # -u file is already uncommented # -s light speed test (~6 MiB per mirror) # -L keep top 10 # -S stability + speed on top of sync/freshness ExecStart=/usr/bin/ghostmirror \ -P -o \ -m /etc/pacman.d/mirrorlist \ -u \ -l /etc/pacman.d/mirrorlist \ -L 10 \ -s light \ -S state,outofdate,morerecent,estimated,speed Nice=10 IOSchedulingClass=best-effort IOSchedulingPriority=5 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target