1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-09-05 18:41:00 +00:00
conduit/snap/local/set-environment
Christopher James Halse Rogers a1af588246
Initial snapcraft metadata
2020-11-25 15:35:40 +11:00

23 lines
489 B
Bash
Executable file

#!/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 $@