summaryrefslogtreecommitdiff
path: root/net-im/mautrix-telegram/files/mautrix-telegram.initd-r2
blob: c90c778de6d2809872f156a551797becf14f417e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/sbin/openrc-run
# shellcheck shell=sh
#
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

: "${supervisor:=supervise-daemon}"

description="Matrix-Telegram Messenger puppeting bridge"
command="/usr/bin/mautrix-telegram"
command_args="-c ${MAUTRIX_TELEGRAM_CONFIG:-/etc/mautrix/mautrix_telegram.yaml} ${MAUTRIX_TELEGRAM_OPTS}"
command_user="mautrix-telegram:mautrix"
pidfile="/run/mautrix-telegram/${RC_SVCNAME}.pid"

depend() {
	need net
	use dns postgresql
}

start_pre() {
	checkpath -d -o "${command_user}" /run/mautrix-telegram
}