~dricottone/huttese-apk

98bc0c3b1f3ae3601ebe176d2d0339bcda259196 — Drew DeVault 5 years ago 78032e4
Add todo.sr.ht webhooks service
M sr.ht/todo.sr.ht/APKBUILD => sr.ht/todo.sr.ht/APKBUILD +14 -4
@@ 1,6 1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=todo.sr.ht
pkgver=0.36.2
pkgver=0.42.0
pkgrel=0
pkgdesc="sr.ht ticket tracking service"
url="https://git.sr.ht/~sircmpwn/todo.sr.ht"


@@ 19,6 19,8 @@ source="
	todo.sr.ht.confd
	todo.sr.ht-lmtp.initd
	todo.sr.ht-lmtp.confd
	todo.sr.ht-webhooks.confd
	todo.sr.ht-webhooks.initd
"
builddir="$srcdir/$pkgname-$pkgver"
export PKGVER=$pkgver


@@ 41,8 43,16 @@ package() {
		"$pkgdir"/etc/init.d/todo.sr.ht-lmtp
	install -Dm644 "$srcdir"/todo.sr.ht-lmtp.confd \
		"$pkgdir"/etc/conf.d/todo.sr.ht-lmtp
	install -Dm755 "$srcdir"/todo.sr.ht-webhooks.initd \
		"$pkgdir"/etc/init.d/todo.sr.ht-webhooks
	install -Dm644 "$srcdir"/todo.sr.ht-webhooks.confd \
		"$pkgdir"/etc/conf.d/todo.sr.ht-webhooks
}

sha512sums="5dd2a3cd498f61f67907bb01a18328942e5fad25796648ef71da5bf575dc58e393608165d6476904bd15c95f175a18c2de78253d536ecf3b5c21d4dc48495f13  todo.sr.ht-0.26.3.tar.gz
a7f9c4f821ebca82058b7891722753e57d92a6a0c5e78522c7350c80f292bd2f378b14bdcefd0211dad0933c8fb105617e168596a0a5eda8e46f30406ce52587  todo.sr.ht.initd
a136bda51bef167c90d0c07f158eb24f0e769b5020723cd4ffe49854080540f1e6ac92dbeec469ad124253603dd6f9484c9b7c69c5d406bb1b72e686e775a147  todo.sr.ht.confd"
sha512sums="2596b97f9d2344d5eb5d260b7615784e23ed605c497f8677285bffb525880152c647339d87172df469055e23300ff959cc1e2cc6623a33cb92836e5019da9ddc  todo.sr.ht-0.42.0.tar.gz
05c613adce3b08bbfd9af839e01282eb71dc679bf059c43f94c8122179ffd374a0bb3947cdd2b8ff21503493f413d7199801ac1f065afe731cfde2d4d7a64255  todo.sr.ht.initd
a136bda51bef167c90d0c07f158eb24f0e769b5020723cd4ffe49854080540f1e6ac92dbeec469ad124253603dd6f9484c9b7c69c5d406bb1b72e686e775a147  todo.sr.ht.confd
a35ea2c01e06d37d2452af8245b5ecf5a1c09688472a1efdec31a9ee63eb24f7972ecdd3055147841213e0382dafebd9b8ebc0dfdbca11ef929f507638791c68  todo.sr.ht-lmtp.initd
da5ba92a1e3f49850dbaf6eb98e8eb30baf9c7ebd63e493f1b1b2e5f5c05599710daa998ee070b340f125ec9897fad55b47dad0ad3aca83d1a05d70537f607a2  todo.sr.ht-lmtp.confd
2188b57950d9753b7192945a46c8269b5ff7015fbafd55e4539d7499bd2bd278062ec48fd86fe65d17db78131b013d649204cb23c341b14539fc7d5bebc9a40e  todo.sr.ht-webhooks.confd
60590361e716e8b932620da02ca83827715c1b38a14f36a867bb93a7265f368586dad5b9e4284e0c1a6700cc2b9366539254708516e7e03d445b1cf318942ead  todo.sr.ht-webhooks.initd"

A sr.ht/todo.sr.ht/todo.sr.ht-webhooks.confd => sr.ht/todo.sr.ht/todo.sr.ht-webhooks.confd +8 -0
@@ 0,0 1,8 @@
# Run the daemon as this user:
# TODO_USER=todo

# Extra arguments to pass to celery
# TODO_ARGS=

# If no, use an external postgresql server
# LOCAL_PG=yes

A sr.ht/todo.sr.ht/todo.sr.ht-webhooks.initd => sr.ht/todo.sr.ht/todo.sr.ht-webhooks.initd +23 -0
@@ 0,0 1,23 @@
#!/sbin/openrc-run
name="todo.sr.ht-webhooks"
description="todo.sr.ht webhook delivery service"
supervisor=supervise-daemon
TODO_USER=${TODO_USER:-todo}
TODO_ARGS=${TODO_ARGS:-}
LOCAL_PG=${LOCAL_PG:-yes}
LOGS=/var/log/todo.sr.ht-webhooks.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/celery"
command_args="-A todosrht.webhooks worker --loglevel=info $GIT_ARGS"
command_user="$TODO_USER:$TODO_USER"
pidfile="/run/${RC_SVCNAME}.pid"

depend() {
	need net
	need redis
	[ "$LOCAL_PG" == "yes" ] && need postgresql
}

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$TODO_USER:$TODO_USER"
}