mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 20:13:01 -04:00
30 lines
812 B
Plaintext
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}"
|
|
}
|