From 645799197721d0289a510443a5cf6f6f3a9ad6db Mon Sep 17 00:00:00 2001 From: Eric Phillips Date: Sat, 18 Apr 2026 19:08:46 -0600 Subject: [PATCH] deploy assets --- deploy/pkgstash-refresh.service | 7 +++++++ deploy/pkgstash-refresh.timer | 9 +++++++++ deploy/pkgstash.service | 15 +++++++++++++++ deploy/pkgstash.toml.example | 6 ++++++ 4 files changed, 37 insertions(+) create mode 100644 deploy/pkgstash-refresh.service create mode 100644 deploy/pkgstash-refresh.timer create mode 100644 deploy/pkgstash.service create mode 100644 deploy/pkgstash.toml.example diff --git a/deploy/pkgstash-refresh.service b/deploy/pkgstash-refresh.service new file mode 100644 index 0000000..dcaedd0 --- /dev/null +++ b/deploy/pkgstash-refresh.service @@ -0,0 +1,7 @@ +[Unit] +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 diff --git a/deploy/pkgstash-refresh.timer b/deploy/pkgstash-refresh.timer new file mode 100644 index 0000000..7122e3a --- /dev/null +++ b/deploy/pkgstash-refresh.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Refresh pkgstash db files + +[Timer] +OnCalendar=*-*-* 02:00:00 +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/deploy/pkgstash.service b/deploy/pkgstash.service new file mode 100644 index 0000000..8eae1a6 --- /dev/null +++ b/deploy/pkgstash.service @@ -0,0 +1,15 @@ +[Unit] +Description=Sparse caching arch linux mirror +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +ExecStart=/usr/local/bin/pkgstash +User=pkgstash +Group=pkgstash +Restart=on-failure +RestartSec=5s + +[Install] +WantedBy=multi-user.target diff --git a/deploy/pkgstash.toml.example b/deploy/pkgstash.toml.example new file mode 100644 index 0000000..a5447bb --- /dev/null +++ b/deploy/pkgstash.toml.example @@ -0,0 +1,6 @@ +cache_root = "/home/ewpt3ch/dev/pacman-cache-server/tmprepo" +mirror_url = "https://us.mirrors.cicku.me/archlinux/" +port = "8090" + +[auth] +token = "FakeToken"