|
@@ -8,6 +8,19 @@ set -o nounset
|
|
|
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
|
|
|
__base="$(basename ${__file} .sh)"
|
|
|
+__root="$(cd "$(dirname "${__dir}")" && pwd)"
|
|
|
+
|
|
|
+if [ ! -f "${__root}/env.sh" ]; then
|
|
|
+ cp "${__root}/env.example.sh" "${__root}/env.sh"
|
|
|
+fi
|
|
|
+if [ -n "${UPPYSERVER_DROPBOX_KEY:-}" ] && [ "${UPPYSERVER_DROPBOX_KEY:-***}" != "***" ]; then
|
|
|
+ source "${__root}/env.sh"
|
|
|
+fi
|
|
|
+if [ "${UPPYSERVER_DROPBOX_KEY:-***}" = "***" ]; then
|
|
|
+ echo "Env var UPPYSERVER_DROPBOX_KEY still had the example value '***'. "
|
|
|
+ echo "Please save the actual secrets in '${__root}/env.sh' and try again"
|
|
|
+ exit 1
|
|
|
+fi
|
|
|
|
|
|
function killProcessListeningOnPort () {
|
|
|
local port="${1}"
|