diff --git a/tailscale.sh b/tailscale.sh index ea3f5fd..d4f5c0a 100644 --- a/tailscale.sh +++ b/tailscale.sh @@ -49,7 +49,7 @@ if [[ ! -f /usr/bin/tailscale || ! -f /usr/bin/tailscaled ]]; then echo "Installing dependencies..." echo "Please wait..." ${PACKAGES_UPDATE} >/dev/null 2>&1 - ${PACKAGES_INSTALL} jq wget ${APT_IPTABLES}>/dev/null 2>&1 + ${PACKAGES_INSTALL} jq wget ca-certificates ${APT_IPTABLES}>/dev/null 2>&1 echo "Done" if [ "${APT_IPTABLES}" == "iptables " ]; then @@ -100,14 +100,16 @@ fi unset TSD_PARAMS unset TS_PARAMS -if [ -v SERVER_DIR ]; then +if [ ! -z "${TAILSCALE_STATE_DIR}" ]; then + TSD_STATE_DIR="${TAILSCALE_STATE_DIR}" +elif [ -v SERVER_DIR ]; then TSD_STATE_DIR=${SERVER_DIR}/.tailscale_state echo "Settings Tailscale state dir to: ${TSD_STATE_DIR}" elif [ -v DATA_DIR ]; then TSD_STATE_DIR=${DATA_DIR}/.tailscale_state echo "Settings Tailscale state dir to: ${TSD_STATE_DIR}" else - if [ -z "${TAILSCALE_STAT_DIR}" ]; then + if [ -z "${TAILSCALE_STATE_DIR}" ]; then TAILSCALE_STATE_DIR="/config/.tailscale_state" fi TSD_STATE_DIR=${TAILSCALE_STATE_DIR}