Conduit is a simple, fast and reliable chat server powered by Matrix https://conduit.rs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
489 B
24 lines
489 B
|
5 years ago
|
#!/bin/sh
|
||
|
|
|
||
|
|
enabled="$(snapctl get enabled)"
|
||
|
|
if [ -z "${enabled}" -o "${enabled}" != "true" ]
|
||
|
|
then
|
||
|
|
echo "Conduit not yet enabled"
|
||
|
|
exit 0
|
||
|
|
fi
|
||
|
|
|
||
|
|
export ROCKET_SERVER_NAME="$(snapctl get base-url)"
|
||
|
|
|
||
|
|
listen_address="$(snapctl get listen.address)"
|
||
|
|
if [ -n "${listen_address}" ]
|
||
|
|
then
|
||
|
|
export ROCKET_ADDRESS="$(snapctl get listen.address)"
|
||
|
|
export ROCKET_PORT="$(snapctl get listen.port)"
|
||
|
|
fi
|
||
|
|
|
||
|
|
export ROCKET_ENV="production"
|
||
|
|
export ROCKET_DATABASE_PATH=${SNAP_DATA}
|
||
|
|
|
||
|
|
cd ${SNAP}
|
||
|
|
exec $@
|