feat: add scheduled geofile update system with systemd timer and service

This commit is contained in:
Nebulosa 2026-02-02 12:09:09 +03:00
parent f3d47ebb3f
commit 5d1ae6be16
3 changed files with 30 additions and 0 deletions

View file

@ -20,6 +20,8 @@ on:
- 'x-ui.service.debian'
- 'x-ui.service.arch'
- 'x-ui.service.rhel'
- 'x-ui-updategeo.timer'
- 'x-ui-updategeo.service'
jobs:
build:
@ -83,6 +85,8 @@ jobs:
cp x-ui.service.debian x-ui/
cp x-ui.service.arch x-ui/
cp x-ui.service.rhel x-ui/
cp x-ui-updategeo.timer x-ui/
cp x-ui-updategeo.service x-ui/
cp x-ui.sh x-ui/
mv x-ui/xui-release x-ui/x-ui
mkdir x-ui/bin

11
x-ui-updategeo.service Normal file
View file

@ -0,0 +1,11 @@
[Unit]
Description=x-ui update all geofiles service
After=network.target
Wants=network.target
[Service]
Type=oneshot
ExecStart=/usr/bin/x-ui update-all-geofiles
[Install]
WantedBy=multi-user.target

15
x-ui-updategeo.timer Normal file
View file

@ -0,0 +1,15 @@
[Unit]
Description=x-ui update all geofiles timer
[Timer]
AccuracySec=5min
OnBootSec=5min
OnCalendar=*-*-* 02,14:00:00 UTC
FixedRandomDelay=true
RandomizedDelaySec=10min
Persistent=true
Unit=x-ui-updategeo.service
[Install]
WantedBy=timers.target