mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Co-authored-by: Electroid <Electroid@users.noreply.github.com> Co-authored-by: Meghan Denny <meghan@bun.sh>
23 lines
345 B
Bash
23 lines
345 B
Bash
#!/bin/sh
|
|
|
|
# This script starts tailscale on the current machine.
|
|
|
|
execute() {
|
|
echo "$ $@" >&2
|
|
if ! "$@"; then
|
|
echo "Command failed: $@" >&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
main() {
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "Usage: $0 <auth-key>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
execute tailscale up --reset --ssh --accept-risk=lose-ssh --auth-key="$1"
|
|
}
|
|
|
|
main "$@"
|