diff options
Diffstat (limited to 'statuspage-git')
-rw-r--r-- | statuspage-git/PKGBUILD | 41 | ||||
-rw-r--r-- | statuspage-git/statuspage.service | 32 | ||||
-rw-r--r-- | statuspage-git/statuspage.yaml | 14 | ||||
-rw-r--r-- | statuspage-git/sysusers.conf | 1 |
4 files changed, 88 insertions, 0 deletions
diff --git a/statuspage-git/PKGBUILD b/statuspage-git/PKGBUILD new file mode 100644 index 0000000..a2f9e50 --- /dev/null +++ b/statuspage-git/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: metamuffin <metamuffin@disroot.org> + +pkgname=statuspage-git +pkgver=r19.0c33249 +pkgrel=1 +pkgdesc="service status page" +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +url="https://codeberg.org/metamuffin/statuspage" +license=('AGPL3') +makedepends=('rustup') +backup=('etc/statuspage.yaml') +source=("git+https://codeberg.org/metamuffin/statuspage.git" + "statuspage.service" + "statuspage.yaml" + "sysusers.conf") +sha256sums=("SKIP" + "SKIP" + "SKIP" + "SKIP") + +pkgver() { + cd "statuspage" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} +prepare() { + cd "statuspage" + rustup default nightly + cargo +nightly fetch --locked --target "$CHOST" +} +build() { + cd "statuspage" + cargo +nightly build --frozen --release --target "$CHOST" +} +package() { + mkdir -p "$pkgdir/usr/share/statuspage" + install -Dm755 statuspage/target/$CHOST/release/statuspage "$pkgdir/usr/bin/statuspage" + install -Dm644 statuspage.service "$pkgdir/usr/lib/systemd/system/statuspage.service" + install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/statuspage.conf" + install -Dm644 statuspage/COPYING "$pkgdir/usr/share/licenses/statuspage/COPYING" + install -Dm644 statuspage.yaml "$pkgdir/etc/statuspage.yaml" +} diff --git a/statuspage-git/statuspage.service b/statuspage-git/statuspage.service new file mode 100644 index 0000000..ea2dd09 --- /dev/null +++ b/statuspage-git/statuspage.service @@ -0,0 +1,32 @@ +[Unit] +Description=service status page +After=network.target +Wants=network-online.target + +[Service] +ExecStart=/usr/bin/statuspage /etc/statuspage.yaml +User=statuspage +LockPersonality=yes +MemoryDenyWriteExecute=yes +NoNewPrivileges=yes +PrivateDevices=true +PrivateTmp=true +ProtectClock=yes +ProtectControlGroups=yes +ProtectHome=true +ProtectHostname=yes +ProtectKernelLogs=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +ProtectSystem=full +RestrictAddressFamilies=~AF_PACKET AF_NETLINK +RestrictNamespaces=yes +RestrictSUIDSGID=yes +RestrictRealtime=yes +Restart=always +SystemCallArchitectures=native +SystemCallFilter=@system-service +Type=simple + +[Install] +WantedBy=multi-user.target diff --git a/statuspage-git/statuspage.yaml b/statuspage-git/statuspage.yaml new file mode 100644 index 0000000..2d7d0eb --- /dev/null +++ b/statuspage-git/statuspage.yaml @@ -0,0 +1,14 @@ +title: "My Status Page" +bind: 127.0.0.1:8000 +interval: 60 + +services: + - title: sshd + checks: + - !systemd "sshd" + + - title: CUPS + url: https://127.0.0.1:631/ + checks: + - !systemd cups + - !http { url: https://127.0.0.1:631/ } diff --git a/statuspage-git/sysusers.conf b/statuspage-git/sysusers.conf new file mode 100644 index 0000000..014df4f --- /dev/null +++ b/statuspage-git/sysusers.conf @@ -0,0 +1 @@ +u statuspage - "service status page" - - |