-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[Feature] Better setup / install docs / avoid reinventing the wheel #2504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
And it took two more iterations to get it right and get rid of the sandboxed warning: (Imagine thousands of users going through the same process that I did and trying to figure it out... Maybe a "first-world problem," but so does this project solve for that matter...) #!/bin/bash
set -euo pipefail
# Check required commands
command -v curl >/dev/null || { echo "Error: curl required" >&2; exit 1; }
command -v jq >/dev/null || { echo "Error: jq required" >&2; exit 1; }
# Create temp directory with proper permissions
TMPDIR=$(mktemp -d)
chmod 755 "$TMPDIR" # Critical: Make directory accessible to _apt user
trap 'rm -rf "$TMPDIR"' EXIT
# Get latest version
API_URL="https://api.github.com/repos/juanfont/headscale/releases/latest"
TAG=$(curl -s "$API_URL" | jq -r '.tag_name')
VERSION="${TAG#v}" # Remove 'v' prefix
# Get system architecture
ARCH=$(dpkg --print-architecture)
# Build download URL
DEB_URL="https://github.com/juanfont/headscale/releases/download/${TAG}/headscale_${VERSION}_linux_${ARCH}.deb"
# Download package to temp directory
DEB_FILE="${TMPDIR}/headscale.deb"
echo "Downloading headscale ${VERSION} (${ARCH})..."
curl -L -o "$DEB_FILE" "$DEB_URL"
chmod 644 "$DEB_FILE" # Make .deb file readable by all users
# Install package from temp location
echo "Installing..."
sudo apt install -y "$DEB_FILE"
echo -e "\nInstallation complete!"
echo "Configure headscale: sudo nano /etc/headscale/config.yaml"
echo "Check service status: sudo systemctl status headscale" |
Thanks, but I generally dont agree with that this would improve this for thousands, I, and I think a lot of other sysadmins has their own setup (ansible, nix, chef, puppet, saltstack) and would in general be very sceptical to those kind of scripts. In addition, where should you draw the line for distributions, this only works for debian, what about the other distribution or distro independence. I would also not really be too comfortable making a script people pipe willy nilly into their setup, quite vulnerable for supply chain attacks, my bash knowledge is not great and in general we can forget to maintain it. |
why would you need script for...
just 3 actions... wtf is this overengineered ai garbage |
Use case
Thanks for this project. Trying to set up / figure it out.
Considering the simplicity of installation of other popular, well-known projects:
Why can't we just have a command-line install like these have?
This manual config of version numbers is really tedious, especially if we each have to re-invent the wheel to do an automated / semi-auto update process, since this is not part of a packaged system.
Here's what DeepSeek just generated for me (no idea if it works yet), but why can't this repo have an official shell script that we just curl and it does this for us? It would save countless hours across thousands of people.
Thank you....
Description
Here's a script that automatically fetches and installs the latest headscale .deb package for your system's architecture:
Features:
To use:
The script will:
Note: You may need to install jq first (sudo apt install jq) if you don't have it already.
Contribution
How can it be implemented?
Create a shell script and curl command line that can be run to automate install/upgrade.
If it's infeasible to do on multiple distros, at least create the recommended one that will run on Ubuntu/Debian.
The text was updated successfully, but these errors were encountered: