rm -rf /usr/local/go
GOVERSION="1.22.3"
wget "https://golang.org/dl/go${GOVERSION}.linux-amd64.tar.gz" -4
tar -C /usr/local -xvf "go${GOVERSION}.linux-amd64.tar.gz"
rm "go${GOVERSION}.linux-amd64.tar.gz"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GitHub user/repo | |
GITHUB_REPO="xmrig/xmrig" | |
# Use GitHub API to fetch the latest release information | |
LATEST_RELEASE_INFO=$(curl -s https://api.github.com/repos/$GITHUB_REPO/releases/latest) | |
# Parse version and tarball URL from the release information | |
XMRIG_VERSION=$(echo "$LATEST_RELEASE_INFO" | jq -r '.tag_name') |
-- listen for console connection with the given secret key
-- controlSocket("0.0.0.0")
-- setKey(please generate a fresh private key with makeKey())
-- start the web server on port 8083, using password 'set a random password here'
-- webserver("0.0.0.0:8083", "set a random password here")
-- accept DNS queries on UDP/5200 and TCP/5200
apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to download file | |
download_file() { | |
url=$1 | |
file_name=$2 | |
if command -v wget > /dev/null; then | |
wget "$url" -O "$file_name" | |
elif command -v curl > /dev/null; then |
iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 65
References
NewerOlder