Undefined function `tailscale_update` in `manage.sh`
Closed this issue · 0 comments
mhriemers commented
There is an error (/mnt/data/tailscale/manage.sh: line 151: tailscale_update: not found
) in the code of manage.sh
.
tailscale-udm/package/manage.sh
Line 151 in 8d3758c
tailscale_update
is an undefined function in the script. Workaround would be to structure the script like this:
tailscale_update() {
tailscale_stop
tailscale_install "$1"
tailscale_start
}
case $1 in
"update!")
if tailscale_has_update "$2"; then
tailscale_update "$2"
else
echo "Tailscale is already up to date"
fi
;;
"on-boot")
# shellcheck source=package/tailscale-env
. "${TAILSCALE_ROOT}/tailscale-env"
if [ "${TAILSCALE_AUTOUPDATE}" = "true" ]; then
tailscale_has_update && tailscale_update || echo "Not updated"
fi
tailscale_start
;;
Want me to submit a PR?