From 97e871253f1cd853017b49338e4c41cbe895b868 Mon Sep 17 00:00:00 2001 From: Eric Phillips Date: Thu, 7 May 2026 11:02:12 -0600 Subject: [PATCH] randomize timer and get token from environment --- deploy/pkgstash-refresh.service | 3 ++- deploy/pkgstash-refresh.timer | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/pkgstash-refresh.service b/deploy/pkgstash-refresh.service index dcaedd0..370bd6f 100644 --- a/deploy/pkgstash-refresh.service +++ b/deploy/pkgstash-refresh.service @@ -4,4 +4,5 @@ Description=[refresh pkgstash db files] [Service] Type=oneshot User=pkgstash -ExecStart=/usr/bin/curl -s -X POST -H "Authorization: Bearer " http://localhost:8090/api/refresh +EnvironmentFile=/etc/pkgstash/pkgstash.env +ExecStart=/usr/bin/curl -s -X POST -H "Authorization: Bearer ${PKGSTASH_TOKEN}" http://localhost:8090/api/refresh diff --git a/deploy/pkgstash-refresh.timer b/deploy/pkgstash-refresh.timer index 7122e3a..f58457e 100644 --- a/deploy/pkgstash-refresh.timer +++ b/deploy/pkgstash-refresh.timer @@ -3,6 +3,7 @@ Description=Refresh pkgstash db files [Timer] OnCalendar=*-*-* 02:00:00 +RandomizedDelaySec=30m Persistent=true [Install]