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"