aboutsummaryrefslogtreecommitdiff
path: root/net-im/mautrix-telegram
diff options
context:
space:
mode:
authorJulien Roy <julien@jroy.ca>2023-01-21 20:17:36 -0500
committerJulien Roy <julien@jroy.ca>2023-01-21 20:17:36 -0500
commita24520a9a52fbd19f7148e1c4d85343b39baa220 (patch)
treeba90ae17a5d057333b91fd0e491320760f68dce3 /net-im/mautrix-telegram
parent7362b9d3a6178d7a740580b560cf8370b4907814 (diff)
downloadMrRoy-Overlay-a24520a9a52fbd19f7148e1c4d85343b39baa220.tar.gz
MrRoy-Overlay-a24520a9a52fbd19f7148e1c4d85343b39baa220.tar.bz2
MrRoy-Overlay-a24520a9a52fbd19f7148e1c4d85343b39baa220.zip
net-im/mautrix-*: update postinst, config
Signed-off-by: Julien Roy <julien@jroy.ca>
Diffstat (limited to 'net-im/mautrix-telegram')
-rw-r--r--net-im/mautrix-telegram/files/mautrix-telegram.initd2
-rw-r--r--net-im/mautrix-telegram/files/mautrix-telegram.unit2
-rw-r--r--net-im/mautrix-telegram/mautrix-telegram-0.12.2_p20230118.ebuild24
3 files changed, 16 insertions, 12 deletions
diff --git a/net-im/mautrix-telegram/files/mautrix-telegram.initd b/net-im/mautrix-telegram/files/mautrix-telegram.initd
index f83b9f9..7657bde 100644
--- a/net-im/mautrix-telegram/files/mautrix-telegram.initd
+++ b/net-im/mautrix-telegram/files/mautrix-telegram.initd
@@ -8,6 +8,6 @@ module="mautrix_telegram"
pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/python"
-command_args="-m ${module} -c /etc/mautrix/${module}.yaml"
+command_args="-m ${module} -c /etc/mautrix/${module}.yaml -r /var/lib/mautrix/telegram/registration.yaml"
command_background=true
command_user="mautrix-telegram:mautrix"
diff --git a/net-im/mautrix-telegram/files/mautrix-telegram.unit b/net-im/mautrix-telegram/files/mautrix-telegram.unit
index e85ed7e..0c50824 100644
--- a/net-im/mautrix-telegram/files/mautrix-telegram.unit
+++ b/net-im/mautrix-telegram/files/mautrix-telegram.unit
@@ -6,7 +6,7 @@ After=network.target
User=mautrix-telegram
Group=mautrix
Restart=always
-ExecStart=/usr/bin/python -m mautrix_telegram -c /etc/mautrix/mautrix_telegram.yaml
+ExecStart=/usr/bin/python -m mautrix_telegram -c /etc/mautrix/mautrix_telegram.yaml -r /var/lib/mautrix/telegram/registration.yaml
[Install]
WantedBy=multi-user.target \ No newline at end of file
diff --git a/net-im/mautrix-telegram/mautrix-telegram-0.12.2_p20230118.ebuild b/net-im/mautrix-telegram/mautrix-telegram-0.12.2_p20230118.ebuild
index 90a8db4..bb6e757 100644
--- a/net-im/mautrix-telegram/mautrix-telegram-0.12.2_p20230118.ebuild
+++ b/net-im/mautrix-telegram/mautrix-telegram-0.12.2_p20230118.ebuild
@@ -60,18 +60,22 @@ src_install() {
}
pkg_postinst() {
+ optfeature "Prometheus statistics" dev-python/prometheus_client
+ optfeature "Sqlite backend" dev-python/aiosqlite
+
einfo
- elog "Before you can use ${PN}, you must configure it correctly."
+ elog ""
+ elog "Before you can use ${PN}, you must configure it correctly"
elog "The configuration file is located at \"/etc/mautrix/${PN/-/_}.yaml\""
- elog "Next, you must generate a registration file using the following command"
- elog "sudo -u ${PN} /usr/bin/python -m ${PN/-/_} -c /etc/mautrix/${PN}.yaml g"
- elog "Next, you must register you registration.yaml file with your homeserver"
- elog "Then you must launch ${PN} by specifying the registration file"
- elog "sudo -u ${PN} /usr/bin/python -m ${PN/-/_} -r registration.yaml"
- elog "After this you can register the bridge with your homeserver"
- elog "Finally, you can start the ${PN} daemon"
+ elog "When done, run the following command: emerge --config ${PN}"
+ elog "Then, you must register the bridge with your homeserver"
+ elog "Refer your homeserver's documentation for instructions"
+ elog "The registration file is located at /var/lib/${PN/-/\/}/registration.yaml"
+ elog "Finally, you may start the ${PN} daemon"
einfo
+}
- optfeature "Prometheus statistics" dev-python/prometheus_client
- optfeature "Sqlite backend" dev-python/aiosqlite
+pkg_config() {
+ su - "${PN}" -s /bin/sh -c \
+ "/usr/bin/python -m \"${PN/-/_}\" -c \"/etc/mautrix/${PN}.yaml -g /var/lib/${PN/-/\/}/registration.yaml\""
}