mirror of
https://github.com/tailscale-dev/deck-tailscale.git
synced 2025-10-21 23:18:12 +00:00
Fix PATH issue on Steam Deck by adding symbolic links
- Create symlinks in /usr/local/bin for immediate global access - Ensure /usr/local/bin directory exists with mkdir -p - Set proper executable permissions on binaries - Keep profile.d approach as fallback and source for current session - Update uninstall script to remove specific files and clean up symlinks - Use rm -rf for systemd override directory cleanup Fixes #38
This commit is contained in:
17
tailscale.sh
17
tailscale.sh
@@ -59,7 +59,22 @@ mkdir -p /opt/tailscale
|
||||
cp -rf $tar_dir/tailscale /opt/tailscale/tailscale
|
||||
cp -rf $tar_dir/tailscaled /opt/tailscale/tailscaled
|
||||
|
||||
# add binaries to path via profile.d
|
||||
# Make binaries executable
|
||||
chmod +x /opt/tailscale/tailscale
|
||||
chmod +x /opt/tailscale/tailscaled
|
||||
|
||||
# Create symbolic links in /usr/local/bin (which is typically in PATH)
|
||||
# Ensure the directory exists first
|
||||
mkdir -p /usr/local/bin
|
||||
|
||||
# Remove existing symlinks first if they exist
|
||||
rm -f /usr/local/bin/tailscale /usr/local/bin/tailscaled
|
||||
|
||||
# Create new symbolic links
|
||||
ln -s /opt/tailscale/tailscale /usr/local/bin/tailscale
|
||||
ln -s /opt/tailscale/tailscaled /usr/local/bin/tailscaled
|
||||
|
||||
# Also add to profile.d as fallback for environments where /usr/local/bin isn't in PATH
|
||||
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
|
||||
|
15
uninstall.sh
15
uninstall.sh
@@ -1,6 +1,13 @@
|
||||
systemctl stop tailscaled
|
||||
systemctl disable tailscaled
|
||||
rm /etc/systemd/system/tailscaled.service
|
||||
rm /etc/default/tailscaled
|
||||
rm /etc/profile.d/tailscale.sh
|
||||
rm -rf /opt/tailscale/tailscale
|
||||
rm -f /etc/systemd/system/tailscaled.service
|
||||
rm -rf /etc/systemd/system/tailscaled.service.d
|
||||
rm -f /etc/default/tailscaled
|
||||
rm -f /etc/profile.d/tailscale.sh
|
||||
rm -f /usr/local/bin/tailscale
|
||||
rm -f /usr/local/bin/tailscaled
|
||||
# Remove specific Tailscale binaries
|
||||
rm -f /opt/tailscale/tailscale
|
||||
rm -f /opt/tailscale/tailscaled
|
||||
# Remove the directory if it's empty (will fail silently if it contains other files)
|
||||
rmdir /opt/tailscale 2>/dev/null || true
|
||||
|
Reference in New Issue
Block a user