mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-13 07:10:51 +02:00
Replace wget with curl -fsSL, normalize downloads, and prep for IPv6 (#3455)
* Initial Call, Switch from curl -s to curl -fsSL and wget to curl -fssL * more switches * switch vms * more curls * More curls * more * more * more changes * more * prepare ipv6 calls * change frontend to ipv6 * Formatting * Fromatting * Update gomft.sh * Update gomft-install.sh * Update ersatztv.sh * Update build.func --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
set -e
|
||||
header_info() {
|
||||
clear
|
||||
cat <<EOF
|
||||
clear
|
||||
cat <<EOF
|
||||
________ __ __ _____
|
||||
/ ___/ _ \/ / / / / ___/__ _ _____ _______ ___ _______
|
||||
/ /__/ ___/ /_/ / / (_ / _ \ |/ / -_) __/ _ \/ _ \/ __(_-<
|
||||
@@ -26,9 +26,9 @@ while read -r TAG ITEM; do
|
||||
done < <(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors | tr ' ' '\n' | grep -v "$current_governor")
|
||||
scaling_governor=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current CPU Scaling Governor is set to $current_governor" --checklist "\nSelect the Scaling Governor to use:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${GOVERNORS_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
[ -z "$scaling_governor" ] && {
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No CPU Scaling Governor Selected" --msgbox "It appears that no CPU Scaling Governor was selected" 10 68
|
||||
clear
|
||||
exit
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No CPU Scaling Governor Selected" --msgbox "It appears that no CPU Scaling Governor was selected" 10 68
|
||||
clear
|
||||
exit
|
||||
}
|
||||
echo "${scaling_governor}" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null
|
||||
current_governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
||||
@@ -38,21 +38,24 @@ CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU Scaling G
|
||||
"no" " " 3>&2 2>&1 1>&3)
|
||||
|
||||
case $CHOICE in
|
||||
yes)
|
||||
set +e
|
||||
NEW_CRONTAB_COMMAND="(sleep 60 && echo \"$current_governor\" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor)"
|
||||
EXISTING_CRONTAB=$(crontab -l 2>/dev/null)
|
||||
if [[ -n "$EXISTING_CRONTAB" ]]; then
|
||||
TEMP_CRONTAB_FILE=$(mktemp)
|
||||
echo "$EXISTING_CRONTAB" | grep -v "@reboot (sleep 60 && echo*" > "$TEMP_CRONTAB_FILE"
|
||||
crontab "$TEMP_CRONTAB_FILE"
|
||||
rm "$TEMP_CRONTAB_FILE"
|
||||
fi
|
||||
(crontab -l 2>/dev/null; echo "@reboot $NEW_CRONTAB_COMMAND") | crontab -
|
||||
echo -e "\nCrontab Set (use 'crontab -e' to check)"
|
||||
;;
|
||||
no)
|
||||
echo -e "\n\033[31mNOTE: Settings return to default after reboot\033[m\n"
|
||||
;;
|
||||
yes)
|
||||
set +e
|
||||
NEW_CRONTAB_COMMAND="(sleep 60 && echo \"$current_governor\" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor)"
|
||||
EXISTING_CRONTAB=$(crontab -l 2>/dev/null)
|
||||
if [[ -n "$EXISTING_CRONTAB" ]]; then
|
||||
TEMP_CRONTAB_FILE=$(mktemp)
|
||||
echo "$EXISTING_CRONTAB" | grep -v "@reboot (sleep 60 && echo*" >"$TEMP_CRONTAB_FILE"
|
||||
crontab "$TEMP_CRONTAB_FILE"
|
||||
rm "$TEMP_CRONTAB_FILE"
|
||||
fi
|
||||
(
|
||||
crontab -l 2>/dev/null
|
||||
echo "@reboot $NEW_CRONTAB_COMMAND"
|
||||
) | crontab -
|
||||
echo -e "\nCrontab Set (use 'crontab -e' to check)"
|
||||
;;
|
||||
no)
|
||||
echo -e "\n\033[31mNOTE: Settings return to default after reboot\033[m\n"
|
||||
;;
|
||||
esac
|
||||
echo -e "Current CPU Scaling Governor is set to \033[36m$current_governor\033[m\n"
|
||||
|
||||
Reference in New Issue
Block a user