From 8b128cf1e9d0e8a66f87e376e0633a31e4c9341c Mon Sep 17 00:00:00 2001 From: Zac Holland Date: Mon, 18 Dec 2023 13:11:22 -0800 Subject: [PATCH] add small helper if it is the users first time running the script --- tailscale.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tailscale.sh b/tailscale.sh index aa9baba..92163e2 100644 --- a/tailscale.sh +++ b/tailscale.sh @@ -72,6 +72,7 @@ cp -rf $tar_dir/tailscaled /opt/tailscale/tailscaled # add binaries to path via profile.d if ! test -f /etc/profile.d/tailscale.sh; then echo 'PATH="$PATH:/opt/tailscale"' >> /etc/profile.d/tailscale.sh + source /etc/profile.d/tailscale.sh fi # copy the systemd file into place @@ -109,3 +110,11 @@ fi systemctl restart tailscaled &>/dev/null || echo "ERROR: Could not start tailscaled service" echo "done." + +if ! command -v tailscale &> /dev/null; then + echo "Tailscale is installed and running but the binaries are not in your path yet." + echo "Restart your session or run the following command to add them:" + echo "" && echo "source /etc/tailscale" && echo "" +fi + +echo "Installation Complete." \ No newline at end of file