diff --git a/net-im/py-matrix-synapse/files/synapse.in b/net-im/py-matrix-synapse/files/synapse.in index c9cfe42e327a..b7dd4fa57eed 100644 --- a/net-im/py-matrix-synapse/files/synapse.in +++ b/net-im/py-matrix-synapse/files/synapse.in @@ -1,54 +1,48 @@ #!/bin/sh # # Created by: Mark Felder # PROVIDE: synapse # REQUIRE: LOGIN postgresql # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable `synapse': # # synapse_enable="YES" . /etc/rc.subr name=synapse rcvar=synapse_enable load_rc_config ${name} : ${synapse_enable:=NO} : ${synapse_user:=%%USERS%%} : ${synapse_conf:=%%ETCDIR%%/homeserver.yaml} : ${synapse_dbdir:=%%DBDIR%%} : ${synapse_logdir:=%%LOGDIR%%} : ${synapse_pidfile:=%%PIDDIR%%/homeserver.pid} pidfile="${synapse_pidfile}" procname=%%PYTHON_CMD%% command=%%PYTHON_CMD%% command_args="-m synapse.app.homeserver --daemonize -c ${synapse_conf}" start_precmd=start_precmd start_precmd() { if [ ! -d ${synapse_pidfile%/*} ] ; then - install -d -o %%USERS%% -g wheel ${synapse_pidfile%/*}; + install -d -o ${synapse_user} -g wheel ${synapse_pidfile%/*}; fi if [ ! -d ${synapse_dbdir} ] ; then - install -d -o %%USERS%% -g wheel ${synapse_dbdir}; + install -d -o ${synapse_user} -g wheel ${synapse_dbdir}; fi if [ ! -d ${synapse_logdir} ] ; then - install -d -o %%USERS%% -g wheel ${synapse_logdir}; - fi - - if $(grep -q CHANGEME ${synapse_conf}) ; then - echo "Error: Default secret values in config." - echo "Please replace the CHANGEME values in ${synapse_conf}" - exit 1 + install -d -o ${synapse_user} -g wheel ${synapse_logdir}; fi } run_rc_command "$1"