aboutsummaryrefslogtreecommitdiff
path: root/repo/ksutils-github-webhook
diff options
context:
space:
mode:
authorMagomeYae <[email protected]>2021-12-09 23:26:36 +0800
committerMagomeYae <[email protected]>2021-12-09 23:26:36 +0800
commit31a332342e1482a404683724cfcfe94729b17906 (patch)
tree46474e90e9f0b1186674c8b35eb263df4b78155d /repo/ksutils-github-webhook
parentd5b15237dff49e773bc5398e313914b1ab46baa4 (diff)
feat(add-pkg): Add ksutils-probe-client
Signed-off-by: MagomeYae <[email protected]>
Diffstat (limited to 'repo/ksutils-github-webhook')
-rw-r--r--repo/ksutils-github-webhook/PKGBUILD37
-rw-r--r--repo/ksutils-github-webhook/default.toml9
-rw-r--r--repo/ksutils-github-webhook/[email protected]16
3 files changed, 62 insertions, 0 deletions
diff --git a/repo/ksutils-github-webhook/PKGBUILD b/repo/ksutils-github-webhook/PKGBUILD
new file mode 100644
index 0000000..2e4c1ad
--- /dev/null
+++ b/repo/ksutils-github-webhook/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: KunoiSayami <[email protected]>
+
+_basename=github-webhook
+pkgname=ksutils-$_basename
+pkgver=1.0.0
+pkgrel=1
+pkgdesc='A simple webhook server forward message to telegram'
+arch=('any')
+url=https://github.com/KunoiSayami/github-webhook-notification.rs
+source=(
+ git://github.com/KunoiSayami/github-webhook-notification.rs#tag=1.0.0
+ "default.toml")
+license=('AGPL3')
+sha512sums=(
+ 'SKIP'
+ '393f3e06466e3dc6b4e550e0257279094430fab65b44c44d7c09cd6c2b26d200cd3b6aa6bc72d417c20b700a3b0f5e9a4845dddc3511d9dbaba0c3d8ff31b869'
+ '8014c6784febd857a47b9f4460d537a0a967a15fa33c6b8b2ccec382125219530f1d2cd25e406b14a902088e2c1693ed68ea43d4f4daab04829129d89ff9b803')
+makedepends=('cargo' 'git')
+depends=('systemd')
+provides=("$_basename")
+options=(!lto)
+
+build() {
+ cd "$_basename"
+ cargo build --release
+}
+
+package() {
+ install -dm700 "$pkgdir"/etc/ksutils/$_basename
+ install -dm755 "$pkgdir"/usr/bin
+ install -dm755 "$pkgdir"/usr/lib/systemd/system
+
+ install -m755 "$_basename"/target/release/"$_basename" "$pkgdir"/usr/bin/"$pkgname"
+ install -m600 default.toml "$pkgdir"/etc/ksutils/$_basename/
+ install -m644 "[email protected]" "$pkgdir"/usr/lib/systemd/system/
+}
diff --git a/repo/ksutils-github-webhook/default.toml b/repo/ksutils-github-webhook/default.toml
new file mode 100644
index 0000000..3b85e64
--- /dev/null
+++ b/repo/ksutils-github-webhook/default.toml
@@ -0,0 +1,9 @@
+[server]
+bind = ""
+port = 25511
+secrets = ""
+token = ""
+
+[telegram]
+bot_token = ""
+send_to = 0 \ No newline at end of file
diff --git a/repo/ksutils-github-webhook/[email protected] b/repo/ksutils-github-webhook/[email protected]
new file mode 100644
index 0000000..f2c677c
--- /dev/null
+++ b/repo/ksutils-github-webhook/[email protected]
@@ -0,0 +1,16 @@
+[Unit]
+Description=KunoiSayami utils GitHub webhook server
+After=network-online.target
+
+[Service]
+Type=simple
+Restart=on-failure
+RestartSec=10s
+Environment="RUST_LOG=info"
+ExecStart=/usr/bin/ksutils-github-webhook -c %i.toml
+WorkingDirectory=/etc/ksutils/github-webhook/
+KillSignal=SIGINT
+TimeoutStopSec=10
+
+[Install]
+WantedBy=multi-user.target