From e133bb570b2966474974a1fbfe525e8b4847986f Mon Sep 17 00:00:00 2001 From: Denton Gentry Date: Sat, 4 Dec 2021 17:17:46 -0800 Subject: [PATCH] install.sh: add linuxmint, kali, several more. After apt install, Kali Linux had not enabled nor started the tailscaled systemd service. Add a quirks mode to enable and start it after apt install for debian platforms. Signed-off-by: Denton Gentry --- scripts/installer.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/scripts/installer.sh b/scripts/installer.sh index d6c779d55..cf86da56b 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -32,7 +32,7 @@ main() { # - VERSION_CODENAME: the codename of the OS release, if any (e.g. "buster") . /etc/os-release case "$ID" in - ubuntu|pop|neon) + ubuntu|pop|neon|zorin|elementary|linuxmint) OS="ubuntu" VERSION="$VERSION_CODENAME" PACKAGETYPE="apt" @@ -68,6 +68,23 @@ main() { APT_KEY_TYPE="keyring" fi ;; + kali) + OS="debian" + PACKAGETYPE="apt" + YEAR="$(echo "$VERSION_ID" | cut -f1 -d.)" + APT_SYSTEMCTL_START=true + # Third-party keyrings became the preferred method of + # installation in Debian 11 (Bullseye), which Kali switched + # to in roughly 2021.x releases + if [ "$YEAR" -lt 2021 ]; then + # Kali VERSION_ID is "kali-rolling", which isn't distinguishing + VERSION="buster" + APT_KEY_TYPE="legacy" + else + VERSION="bullseye" + APT_KEY_TYPE="keyring" + fi + ;; centos) OS="$ID" VERSION="$VERSION_ID" @@ -94,6 +111,11 @@ main() { VERSION="" PACKAGETYPE="dnf" ;; + rocky) + OS="fedora" + VERSION="" + PACKAGETYPE="dnf" + ;; amzn) OS="amazon-linux" VERSION="$VERSION_ID" @@ -386,6 +408,10 @@ main() { esac $SUDO apt-get update $SUDO apt-get install tailscale + if [ "$APT_SYSTEMCTL_START" = "true" ]; then + $SUDO systemctl enable --now tailscaled + $SUDO systemctl start tailscaled + fi set +x ;; yum)