Files
guru/net-im/mautrix-telegram/files/mautrix-telegram.initd-r1
Anna (cybertailor) Vyalkova f285cf3c7f net-im/mautrix-telegram: add 0.15.2, drop old
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
2024-08-10 21:39:07 +05:00

30 lines
812 B
Plaintext

#!/sbin/openrc-run
# shellcheck shell=sh
#
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
: ${MAUTRIX_TELEGRAM_CONFIG:=/etc/mautrix/mautrix_telegram.yaml}
: ${MAUTRIX_TELEGRAM_LOG:=/var/log/mautrix/mautrix-telegram_daemon.log}
description="A Matrix-Telegram Messenger puppeting bridge"
command="/usr/bin/python"
command_args="-m mautrix_telegram -c ${MAUTRIX_TELEGRAM_CONFIG} ${MAUTRIX_TELEGRAM_OPTS}"
command_background=true
command_user="mautrix-telegram:mautrix"
pidfile="/run/${RC_SVCNAME}.pid"
output_log="${MAUTRIX_TELEGRAM_LOG}"
error_log="${output_log}"
depend() {
need net
use dns postgresql
}
start_pre() {
checkpath -d -m 0755 -o "${command_user}" /var/lib/mautrix/telegram
checkpath -f -m 0644 -o "${command_user}" "${output_log}"
}