#!/bin/sh

set -eu

if [ -n "${TURNSTILE_ENV_DIR:-}" ]; then
  exec chpst -e "$TURNSTILE_ENV_DIR" syncthing serve --no-browser --no-restart --logfile=default
fi

exec syncthing serve --no-browser --no-restart --logfile=default
