SwordArMor-gentoo-overlay/net-im/mautrix-telegram/files/mautrix-telegram.initd

26 lines
749 B
Plaintext

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