diff --git a/config b/config index 180689b4..0bc7cde9 100755 --- a/config +++ b/config @@ -92,10 +92,10 @@ elif [ "$1" = "-a" ]; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then echo "Battery saver mode activated." - if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi +# if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi else echo "Not battery saver mode" - sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt +# sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt fi echo "rebooting" @@ -109,10 +109,10 @@ elif [ "$1" = "-m" ]; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then echo "Battery saver mode activated." - if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi + # if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi else echo "Not battery saver mode" - sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt + # sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt fi echo "rebooting" sudo reboot now @@ -121,7 +121,7 @@ elif [ "$1" = "-m" ]; then elif [ "$1" = "-f" ]; then echo "changing CubeSatSim to FSK mode" sudo echo "f" > /home/pi/CubeSatSim/.mode - if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi +# if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi echo "rebooting" sudo reboot now # sudo systemctl restart cubesatsim @@ -129,7 +129,7 @@ elif [ "$1" = "-f" ]; then elif [ "$1" = "-b" ]; then echo "changing CubeSatSim to BPSK mode" sudo echo "b" > /home/pi/CubeSatSim/.mode - if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi +# if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi echo "rebooting" sudo reboot now # sudo systemctl restart cubesatsim @@ -141,10 +141,10 @@ elif [ "$1" = "-s" ]; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then echo "Battery saver mode activated." - if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi +# if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi else echo "Not battery saver mode" - sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt +# sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt fi echo "rebooting" sudo reboot now