~dricottone/huttese-apk

f6ed7f52f4cfce21e43c99eb84b7f7647134d54b — Drew DeVault 5 years ago d551c20
Add todo.sr.ht-lmtp
M sr.ht/todo.sr.ht/APKBUILD => sr.ht/todo.sr.ht/APKBUILD +6 -0
@@ 17,6 17,8 @@ source="
	$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz
	todo.sr.ht.initd
	todo.sr.ht.confd
	todo.sr.ht-lmtp.initd
	todo.sr.ht-lmtp.confd
"
builddir="$srcdir/$pkgname-$pkgver"
export PKGVER=$pkgver


@@ 35,6 37,10 @@ package() {
		"$pkgdir"/etc/init.d/todo.sr.ht
	install -Dm644 "$srcdir"/todo.sr.ht.confd \
		"$pkgdir"/etc/conf.d/todo.sr.ht
	install -Dm755 "$srcdir"/todo.sr.ht-lmtp.initd \
		"$pkgdir"/etc/init.d/todo.sr.ht-lmtp
	install -Dm644 "$srcdir"/todo.sr.ht-lmtp.confd \
		"$pkgdir"/etc/conf.d/todo.sr.ht-lmtp
}

sha512sums="5dd2a3cd498f61f67907bb01a18328942e5fad25796648ef71da5bf575dc58e393608165d6476904bd15c95f175a18c2de78253d536ecf3b5c21d4dc48495f13  todo.sr.ht-0.26.3.tar.gz

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

# Extra arguments to pass to Gunicorn
# TODO_ARGS=

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

A sr.ht/todo.sr.ht/todo.sr.ht-lmtp.initd => sr.ht/todo.sr.ht/todo.sr.ht-lmtp.initd +21 -0
@@ 0,0 1,21 @@
#!/sbin/openrc-run
name="todo.sr.ht-ltmp"
description="todo.sr.ht mail processing daemon"
supervisor=supervise-daemon
TODO_USER=${TODO_USER:-todo}
TODO_ARGS=${TODO_ARGS:-}
LOCAL_PG=${LOCAL_PG:-yes}
LOGS=/var/log/todo.sr.ht-lmtp.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/todosrht-lmtp"
command_user="$TODO_USER:$TODO_USER"
pidfile="/run/${RC_SVCNAME}.pid"

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

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