M sr.ht/todo.sr.ht/APKBUILD => sr.ht/todo.sr.ht/APKBUILD +11 -3
@@ 23,6 23,8 @@ source="
todo.sr.ht-lmtp.confd
todo.sr.ht-webhooks.confd
todo.sr.ht-webhooks.initd
+ todo.sr.ht-api.confd
+ todo.sr.ht-api.initd
"
export PKGVER=$pkgver
options="$options !check"
@@ 46,6 48,10 @@ package() {
"$pkgdir"/etc/init.d/todo.sr.ht-webhooks
install -Dm644 "$srcdir"/todo.sr.ht-webhooks.confd \
"$pkgdir"/etc/conf.d/todo.sr.ht-webhooks
+ install -Dm755 "$srcdir"/todo.sr.ht-api.initd \
+ "$pkgdir"/etc/init.d/todo.sr.ht-api
+ install -Dm644 "$srcdir"/todo.sr.ht-api.confd \
+ "$pkgdir"/etc/conf.d/todo.sr.ht-api
}
_nginx() {
@@ 55,11 61,13 @@ _nginx() {
"$subpkgdir"/etc/nginx/http.d/todo.sr.ht.conf
}
-sha512sums="1f6d3e51f95ab246492d78225e1a178e8a35144125ee102118c15baf7148c86552a8d075b559b6a5d02a38778d539d1722659ced266c42d58946bec4621709a7 todo.sr.ht-0.61.5.tar.gz
-ef662f839e59bba208210737bf193b230e8e6accf1cda343f91d013b7922f5923f8468d0f18e16376cf6cb6b6c4f2e6a361f7f45fb1da9cc6e42ad045b0e25fc sr.ht-nginx-0.61.5.tar.gz
+sha512sums="01aafd3039c8726ab30cca60a1e1c4e6b2558d27fe2c0f8ba06b1806b6edb9be51be281f49d26cfd2e327c58ccc40bc077c4dde8be6f6519ac01c34b6661d11a todo.sr.ht-0.61.5.tar.gz
+8b6b201b820d5639762d4302f2ef8b6555010991fe14bf6113f20216815ba368f691e82af3818b223e08a37312d68df115f4e76fb73b193ca08a7e0e63ca1eb5 sr.ht-nginx-0.61.5.tar.gz
9f0c7284e7dd21156efdbad8074651c643ed6eb8aaca70d44fdfc652726930f8f1036d7f5d55f64bfb09e220e9c4d8e17b0abb54793daae44716deea6d122145 todo.sr.ht.initd
a4ab31da9633228e14a3baedaa0a257100d2758d5feaeb655a1647fd5a08b5a8a2c7af560d3d3af0956b66e6fbb8cba1fc7c46929eb78c45d81e881ef6d6c6c1 todo.sr.ht.confd
c4ac342b5fa506c1323d9c55f36b800e16cb9afdecc32f94bf7261c8fa2710db839b84137d24f3e43ac28e036cf21f63c381a650661e722e416c61a6cf44c938 todo.sr.ht-lmtp.initd
8765703a5ac67da782e471f3f89d0c6fb58cf1dba7342377bccba6e39bd324c47d13948edd5a99af6376b39f60239b3689f6983b92353380f208fe1f12589907 todo.sr.ht-lmtp.confd
befda599f189e99b542ebaf5dd17739169bf73a1499c9de92a98778bd108bb9813e1838e461ced494c6b495a16e34cf805abdb3ccabcf14c2ccecf2d42e780df todo.sr.ht-webhooks.confd
-a2e9686eacd4f37262067749b8844c005839cf190751ab9d49f631e1aa61f64541715e19a942ab20f0541db2b7594499c5c12b522c7b4b90176543f05d576eb7 todo.sr.ht-webhooks.initd"
+a2e9686eacd4f37262067749b8844c005839cf190751ab9d49f631e1aa61f64541715e19a942ab20f0541db2b7594499c5c12b522c7b4b90176543f05d576eb7 todo.sr.ht-webhooks.initd
+6d096a0559db2c689938e0f0c24d0158efe836dec209f694256f2803494884f206cab423cd5d3b08a68c9446aa2aff1eca0a95da31088fa8a9628becbf344215 todo.sr.ht-api.confd
+a1b4901c6e18bc5826bb359941c99b53143f2b4ecdddf6fbba89c78fa4721578720d9a60fe95d4a4d382ef98cf1c3ad3e3f75d5d46782b1ec349c0c2adc7164b todo.sr.ht-api.initd"
A sr.ht/todo.sr.ht/todo.sr.ht-api.confd => sr.ht/todo.sr.ht/todo.sr.ht-api.confd +8 -0
@@ 0,0 1,8 @@
+# Run the daemon as this user:
+# TODO_USER=todo
+
+# Bind the API service to this address:
+# TODO_BIND=:5103
+
+# Extra arguments to pass to Gunicorn
+# TODO_ARGS=
A sr.ht/todo.sr.ht/todo.sr.ht-api.initd => sr.ht/todo.sr.ht/todo.sr.ht-api.initd +24 -0
@@ 0,0 1,24 @@
+#!/sbin/openrc-run
+name="todo.sr.ht-api"
+description="todo.sr.ht API service"
+supervisor=supervise-daemon
+TODO_USER=${TODO_USER:-todo}
+TODO_BIND=${TODO_BIND:-:5103}
+TODO_ARGS=${TODO_ARGS:-}
+LOGS=/var/log/todo.sr.ht-api.log
+supervise_daemon_args="-1 $LOGS -2 $LOGS"
+command="/usr/bin/todosrht-api"
+command_args="-b $TODO_BIND"
+command_user="$TODO_USER:$TODO_USER"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need net
+ use redis
+ use postgresql
+ use pgbouncer
+}
+
+start_pre() {
+ checkpath -f "$LOGS" -m 644 -o "$TODO_USER:$TODO_USER"
+}