ports/net-im/conduit/files/conduit.in
Ashish SHUKLA bd3820b0b7 net-im/conduit: New port: Matrix server implemented in Rust
An efficient Matrix homeserver that's easy to set up
and just works. You can install it on a mini-computer
like the Raspberry Pi to host Matrix for your family,
friends or company.

WWW: https://conduit.rs/
2021-09-03 15:20:29 +00:00

33 lines
753 B
Bash

#!/bin/sh
# PROVIDE: conduit
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# conduit_enable (bool): Set to NO by default.
# Set it to YES to enable conduit.
# conduit_config (path): Set to %%PREFIX%%/etc/conduit.toml
# by default.
. /etc/rc.subr
name=conduit
rcvar=conduit_enable
desc="Conduit server"
load_rc_config $name
: ${conduit_enable:=NO}
: ${conduit_config:="%%PREFIX%%/etc/conduit.toml"}
command=/usr/sbin/daemon
procname=%%PREFIX%%/bin/conduit
pidfile=/var/run/${name}.pid
conduit_env="CONDUIT_CONFIG=${conduit_config}"
command_args="-P /var/run/daemon_${name}.pid -p $pidfile -u %%USERS%% -H -c -o /var/log/conduit.log $procname"
run_rc_command "$1"