aboutsummaryrefslogtreecommitdiff
path: root/www-apps
diff options
context:
space:
mode:
authorJulien Roy <julien@jroy.ca>2023-01-03 20:34:23 -0500
committerJulien Roy <julien@jroy.ca>2023-01-03 20:34:23 -0500
commitcefd4a3b79f09183421c72581bd7bfcb819c1d30 (patch)
tree1d893416972f171194f442f99b8b8ee59a55ac0a /www-apps
parent6229c1eaa8bef692448c008ec90059b50c5dd060 (diff)
downloadMrRoy-Overlay-cefd4a3b79f09183421c72581bd7bfcb819c1d30.tar.gz
MrRoy-Overlay-cefd4a3b79f09183421c72581bd7bfcb819c1d30.tar.bz2
MrRoy-Overlay-cefd4a3b79f09183421c72581bd7bfcb819c1d30.zip
www-apps/meta-srht: Update daemon scripts
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/meta-srht/files/meta.sr.ht-api.confd1
-rw-r--r--www-apps/meta-srht/files/meta.sr.ht-api.initd15
-rw-r--r--www-apps/meta-srht/files/meta.sr.ht-webhooks.initd15
-rw-r--r--www-apps/meta-srht/files/meta.sr.ht.cron4
-rw-r--r--www-apps/meta-srht/meta-srht-0.63.5.ebuild11
5 files changed, 46 insertions, 0 deletions
diff --git a/www-apps/meta-srht/files/meta.sr.ht-api.confd b/www-apps/meta-srht/files/meta.sr.ht-api.confd
new file mode 100644
index 0000000..335a43e
--- /dev/null
+++ b/www-apps/meta-srht/files/meta.sr.ht-api.confd
@@ -0,0 +1 @@
+PORT=5100 \ No newline at end of file
diff --git a/www-apps/meta-srht/files/meta.sr.ht-api.initd b/www-apps/meta-srht/files/meta.sr.ht-api.initd
new file mode 100644
index 0000000..55955a0
--- /dev/null
+++ b/www-apps/meta-srht/files/meta.sr.ht-api.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="meta.sr.ht API daemon"
+description=""
+command="/usr/bin/metasrht-api"
+command_args="-b ${PORT}"
+command_user="srht:srht"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need net
+}
diff --git a/www-apps/meta-srht/files/meta.sr.ht-webhooks.initd b/www-apps/meta-srht/files/meta.sr.ht-webhooks.initd
new file mode 100644
index 0000000..9b06269
--- /dev/null
+++ b/www-apps/meta-srht/files/meta.sr.ht-webhooks.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="meta.sr.ht daemon"
+description=""
+command="/usr/bin/celery"
+command_args="-A metasrht.webhooks worker --loglevel=INFO"
+command_user="srht:srht"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need net
+}
diff --git a/www-apps/meta-srht/files/meta.sr.ht.cron b/www-apps/meta-srht/files/meta.sr.ht.cron
new file mode 100644
index 0000000..f271a9a
--- /dev/null
+++ b/www-apps/meta-srht/files/meta.sr.ht.cron
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+su - srht -s /bin/sh -c /usr/bin/metasrht-daily
+exit $?
diff --git a/www-apps/meta-srht/meta-srht-0.63.5.ebuild b/www-apps/meta-srht/meta-srht-0.63.5.ebuild
index 7cc9b0d..e4f69e8 100644
--- a/www-apps/meta-srht/meta-srht-0.63.5.ebuild
+++ b/www-apps/meta-srht/meta-srht-0.63.5.ebuild
@@ -54,6 +54,17 @@ src_install() {
dodir "/etc/sr.ht"
insinto "/etc/sr.ht/"
newins "${S}/config.example.ini" "config.ini"
+ exeinto "/etc/cron.daily"
+ doexe "${FILESDIR}/meta.sr.ht.cron"
+ doinitd "${FILESDIR}/meta.sr.ht.initd"
+ doconfd "${FILESDIR}/meta.sr.ht.confd"
+ doinitd "${FILESDIR}/meta.sr.ht-api.initd"
+ doconfd "${FILESDIR}/meta.sr.ht-api.confd"
+ doinitd "${FILESDIR}/meta.sr.ht-webhooks.initd"
+ systemd_dounit "${FILESDIR}/meta.sr.ht.service"
+ systemd_dounit "${FILESDIR}/meta.sr.ht-api.service"
+ systemd_dounit "${FILESDIR}/meta.sr.ht-webhooks.service"
+ systemd_dounit "${FILESDIR}/meta.sr.ht-daily.{service,timer}"
}
plg_postinst() {