added traefik script, and updated hugo script
This commit is contained in:
11
README.md
11
README.md
@ -51,6 +51,17 @@
|
|||||||
|
|
||||||
### `rm -rf /usr/local/go`
|
### `rm -rf /usr/local/go`
|
||||||
|
|
||||||
|
---
|
||||||
|
## [Traefik](https://go.dev/)
|
||||||
|
|
||||||
|
### ✔️ Install/Update
|
||||||
|
|
||||||
|
### `wget -O traefikinstall.sh https://sop.wtf/sh/traefikinstall && bash traefikinstall.sh`
|
||||||
|
|
||||||
|
### ✔️ Uninstall
|
||||||
|
|
||||||
|
### `rm -rf /usr/local/traefik`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## [MariaDB](https://mariadb.org/)
|
## [MariaDB](https://mariadb.org/)
|
||||||
|
@ -37,8 +37,11 @@ if [ -n "$(uname -a | grep armv6l)" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$(uname -a | grep armv7l)" ]; then
|
if [ -n "$(uname -a | grep armv7l)" ]; then
|
||||||
curl -fsSL -o "/tmp/hugo/hugo_extended_"$VER"-arm.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v$VER/hugo_"$VER"-arm.tar.gz"
|
curl -fsSL -o "/tmp/hugo/hugo_"$VER"-arm.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v$VER/hugo_"$VER"-arm.tar.gz"
|
||||||
echo "Hugo Extended is not supported on armv7l, Installing Hugo standard"
|
echo "Hugo Extended is not supported on armv7l, Installing Hugo standard"
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install snapd
|
||||||
|
sudo snap install dart-sass
|
||||||
fi
|
fi
|
||||||
cd /tmp/hugo/
|
cd /tmp/hugo/
|
||||||
tar -xzf /tmp/hugo/*.tar.gz
|
tar -xzf /tmp/hugo/*.tar.gz
|
||||||
|
42
scripts/traefikinstall.sh
Normal file
42
scripts/traefikinstall.sh
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
trap 'exit 130' INT
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
read -r -p "Would you like to install traefik? [Y/n] " input
|
||||||
|
|
||||||
|
case $input in
|
||||||
|
[yY][eE][sS]|[yY])
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
[nN][oO]|[nN])
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "That wasn't an option..."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [ ! -x /usr/bin/curl ] ; then
|
||||||
|
CURL_NOT_EXIST=1
|
||||||
|
apt install -y curl
|
||||||
|
else
|
||||||
|
CURL_NOT_EXIST=0
|
||||||
|
fi
|
||||||
|
rm -rf /tmp/traefik/
|
||||||
|
mkdir /tmp/traefik/
|
||||||
|
VER=$(curl --silent "https://api.github.com/repos/traefik/traefik/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g' )
|
||||||
|
if [ -n "$(uname -a | grep x86_64)" ]; then
|
||||||
|
curl -fsSL -o "/tmp/traefik/traefik_"$VER"_linux_amd64.tar.gz" "https://github.com/traefik/traefik/releases/download/v$VER/traefik_"$VER"_linux_amd64.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$(uname -a | grep armv6l)" ]; then
|
||||||
|
curl -fsSL -o "/tmp/traefik/traefik_"$VER"_linux_armv6.tar.gz" "https://github.com/traefik/traefik/releases/download/v$VER/traefik_"$VER"_linux_armv6.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$(uname -a | grep armv7l)" ]; then
|
||||||
|
curl -fsSL -o "/tmp/traefik/traefik_"$VER"_linux_arm64.tar.gz" "https://github.com/traefik/traefik/releases/download/v$VER/traefik_"$VER"_linux_arm64.tar.gz"
|
||||||
|
fi
|
||||||
|
cd /tmp/traefik/
|
||||||
|
tar -xzf /tmp/traefik/*.tar.gz
|
||||||
|
sudo mv /tmp/traefik/traefik /usr/local/bin
|
||||||
|
cd ~
|
@ -23,6 +23,9 @@ fi
|
|||||||
if [ -n "$(uname -a | grep armv7l)" ]; then
|
if [ -n "$(uname -a | grep armv7l)" ]; then
|
||||||
curl -fsSL -o "/tmp/hugo/hugo_"$VER"-arm.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v$VER/hugo_"$VER"-arm.tar.gz"
|
curl -fsSL -o "/tmp/hugo/hugo_"$VER"-arm.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v$VER/hugo_"$VER"-arm.tar.gz"
|
||||||
echo "Hugo Extended is not supported on armv7l, Installing Hugo standard"
|
echo "Hugo Extended is not supported on armv7l, Installing Hugo standard"
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install snapd
|
||||||
|
sudo snap install dart-sass
|
||||||
fi
|
fi
|
||||||
cd /tmp/hugo/
|
cd /tmp/hugo/
|
||||||
tar -xzf /tmp/hugo/*.tar.gz
|
tar -xzf /tmp/hugo/*.tar.gz
|
||||||
|
26
scripts/unattended/traefikinstall.sh
Normal file
26
scripts/unattended/traefikinstall.sh
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
trap 'exit 130' INT
|
||||||
|
if [ ! -x /usr/bin/curl ] ; then
|
||||||
|
CURL_NOT_EXIST=1
|
||||||
|
apt install -y curl
|
||||||
|
else
|
||||||
|
CURL_NOT_EXIST=0
|
||||||
|
fi
|
||||||
|
rm -rf /tmp/traefik/
|
||||||
|
mkdir /tmp/traefik/
|
||||||
|
VER=$(curl --silent "https://api.github.com/repos/traefik/traefik/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g' )
|
||||||
|
if [ -n "$(uname -a | grep x86_64)" ]; then
|
||||||
|
curl -fsSL -o "/tmp/traefik/traefik_"$VER"_linux_amd64.tar.gz" "https://github.com/traefik/traefik/releases/download/v$VER/traefik_"$VER"_linux_amd64.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$(uname -a | grep armv6l)" ]; then
|
||||||
|
curl -fsSL -o "/tmp/traefik/traefik_"$VER"_linux_armv6.tar.gz" "https://github.com/traefik/traefik/releases/download/v$VER/traefik_"$VER"_linux_armv6.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$(uname -a | grep armv7l)" ]; then
|
||||||
|
curl -fsSL -o "/tmp/traefik/traefik_"$VER"_linux_arm64.tar.gz" "https://github.com/traefik/traefik/releases/download/v$VER/traefik_"$VER"_linux_arm64.tar.gz"
|
||||||
|
fi
|
||||||
|
cd /tmp/traefik/
|
||||||
|
tar -xzf /tmp/traefik/*.tar.gz
|
||||||
|
sudo mv /tmp/traefik/traefik /usr/local/bin
|
||||||
|
cd ~
|
Reference in New Issue
Block a user