Skip to content

Commit

Permalink
Update optimizer.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
opiran-club authored Nov 5, 2024
1 parent 5de5076 commit 368b871
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions optimizer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ swap_maker() {
;;
esac

# Convert swap size to megabytes
if [[ "$swap_size" =~ ([0-9]+)(M|G) ]]; then
size=${BASH_REMATCH[1]}
unit=${BASH_REMATCH[2]}
Expand All @@ -466,7 +465,6 @@ swap_maker() {
return 1
fi

# Debugging output to verify the count
echo "Calculated swap size: $swap_size"
echo "Calculated count in MB: $count"

Expand Down Expand Up @@ -512,6 +510,7 @@ swap_maker() {
sysctl -p

echo && echo -e "${GREEN}Swap file created and vm.swappiness set to ${RED}$swap_value${NC}."
break
done

sleep 1
Expand Down

0 comments on commit 368b871

Please sign in to comment.