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 | |
# Backup the original repository files | |
echo "Backing up original repo files..." | |
sudo cp -r /etc/yum.repos.d /etc/yum.repos.d.backup | |
# Update the repository configuration | |
echo "Updating repository configuration..." | |
sudo sed -i 's|mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/*.repo | |
sudo sed -i 's|#baseurl=http://dl.rockylinux.org/$contentdir/$releasever|baseurl=https://rocky-linux-asia-southeast1.production.gcp.mirrors.ctrliq.cloud/pub/rocky/$releasever|g' /etc/yum.repos.d/*.repo |
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/sh | |
if ! grep -q "bash /root/firewall.sh" "/etc/rc.local"; then | |
echo 'bash /root/firewall.sh' | sudo tee -a /etc/rc.local | |
fi | |
chmod +x /etc/rc.d/rc.local | |
sleep 1s | |
systemctl enable rc-local --now |
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/sh | |
DOMAIN_NAME="" | |
CERTIFICATE_PATH="/etc/letsencrypt/live" | |
# MAKE SURE USE \ TO PREVENT TRAILING SPACES. | |
PRIVATE_KEY="" | |
PUBLIC_CERT="" | |
rm -rfv "$CERTIFICATE_PATH/$DOMAIN_NAME" | |
mkdir -pv "$CERTIFICATE_PATH/$DOMAIN_NAME" | |
echo "$PUBLIC_CERT" | sudo tee -a "$CERTIFICATE_PATH/$DOMAIN_NAME/fullchain.pem" |
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/sh | |
mkdir test | |
echo "You successfully did it" | |
echo "$TOKEN" |
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/sh | |
INSTALL_FIREWALL_URL="https://gist.githubusercontent.com/NotYusta/d1e227f6dbd27323b8c475586fe6d43d/raw/6f83177c3de274a974c93f7bced86f386f9a36ce/firewall.sh" | |
INSTALL_WINGS_URL="https://gist.githubusercontent.com/NotYusta/77c998832676310b53761adb0c3546c7/raw/e895f9309591ca807025732e1832838322bb6b09/install_wings.sh" | |
ADD_SWAP_URL="https://gist.githubusercontent.com/NotYusta/bc86b388b0661604bbab70a987c88bd2/raw/833edc535dc0e063c3f60fe402f6c23a96648231/add_swap.sh" | |
RC_LOCAL_URL="https://gist.githubusercontent.com/NotYusta/0d669bd57bfc67a56c8f1f18941a2b9a/raw/4e00f34a1332bcb01f425adca91d8c6e8964e2d7/rc-local.sh" | |
dnf update -y | |
dnf install curl -y | |
curl -s "$ADD_SWAP_URL" | bash |
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/sh | |
WINGS_SYSTEMD_FILE="/etc/systemd/system/wings.service" | |
WINGS_SYSTEMD="\ | |
[Unit] | |
Description=Pterodactyl Wings Daemon | |
After=docker.service | |
Requires=docker.service | |
PartOf=docker.service | |
[Service] |
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/sh | |
dnf update -y | |
dnf install grep -y | |
fallocate -l 1G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
cp -rv /etc/fstab /etc/fstab.bak | |
if ! grep -q "/swapfile /swapfile swap sw 0 0" "/swapfile"; then |
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/sh | |
dnf update -y | |
dnf install iptables ipset -y | |
ipset create cloudflare-v4 hash:net family inet | |
ipset add cloudflare-v4 173.245.48.0/20 | |
ipset add cloudflare-v4 103.21.244.0/22 | |
ipset add cloudflare-v4 103.22.200.0/22 | |
ipset add cloudflare-v4 103.31.4.0/22 | |
ipset add cloudflare-v4 141.101.64.0/18 |
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
DEFAULT_ARGUMENT="-XX:+UseG1GC \ | |
-XX:+ParallelRefProcEnabled \ | |
-XX:MaxGCPauseMillis=200 \ | |
-XX:+UnlockExperimentalVMOptions \ | |
-XX:+DisableExplicitGC \ | |
-XX:G1NewSizePercent=30 \ | |
-XX:G1MaxNewSizePercent=40 \ | |
-XX:G1HeapRegionSize=8M \ | |
-XX:G1ReservePercent=20 \ | |
-XX:G1HeapWastePercent=5 \ |
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
DEFAULT_ARGUMENT="-Dterminal.jline=false \ | |
-Dterminal.ansi=true \ | |
-XX:+UseG1GC \ | |
-XX:+ParallelRefProcEnabled \ | |
-XX:MaxGCPauseMillis=200 \ | |
-XX:+UnlockExperimentalVMOptions \ | |
-XX:+DisableExplicitGC \ | |
-XX:G1NewSizePercent=30 \ | |
-XX:G1MaxNewSizePercent=40 \ | |
-XX:G1HeapRegionSize=8M \ |
NewerOlder