diff --git a/config b/config index 180689b4..d161ad72 100755 --- a/config +++ b/config @@ -98,9 +98,9 @@ elif [ "$1" = "-a" ]; then sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt fi - echo "rebooting" - sudo reboot now -# sudo systemctl restart cubesatsim +# echo "rebooting" +# sudo reboot now + sudo systemctl restart cubesatsim exit elif [ "$1" = "-m" ]; then echo "changing CubeSatSim to CW mode" @@ -114,25 +114,25 @@ elif [ "$1" = "-m" ]; then echo "Not battery saver mode" sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt fi - echo "rebooting" - sudo reboot now -# sudo systemctl restart cubesatsim +# echo "rebooting" +# sudo reboot now + sudo systemctl restart cubesatsim exit 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 - echo "rebooting" - sudo reboot now -# sudo systemctl restart cubesatsim +# echo "rebooting" +# sudo reboot now + sudo systemctl restart cubesatsim exit 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 - echo "rebooting" - sudo reboot now -# sudo systemctl restart cubesatsim +# echo "rebooting" +# sudo reboot now + sudo systemctl restart cubesatsim exit elif [ "$1" = "-s" ]; then echo "changing CubeSatSim to SSTV mode" @@ -146,9 +146,9 @@ elif [ "$1" = "-s" ]; then echo "Not battery saver mode" sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt fi - echo "rebooting" - sudo reboot now -# sudo systemctl restart cubesatsim +# echo "rebooting" +# sudo reboot now + sudo systemctl restart cubesatsim exit elif [ "$1" = "-h" ]; then echo "config OPTION" @@ -419,9 +419,10 @@ elif [ "$1" = "-C" ]; then sudo journalctl --rotate sudo journalctl --vacuum-time=1s - sudo systemctl reboot now +# sudo systemctl reboot now + sudo systemctl restart cubesatsim - echo "rebooting" +# echo "rebooting" elif [ "$1" = "-T" ]; then @@ -440,13 +441,15 @@ elif [ "$1" = "-T" ]; then if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then sudo sed -i 's/False/True/g' /home/pi/CubeSatSim/command_tx echo "Command state set to True to enable beacon" - echo "rebooting" - sudo reboot now +# echo "rebooting" +# sudo reboot now + sudo systemctl restart cubesatsim else sudo sed -i 's/True/False/g' /home/pi/CubeSatSim/command_tx echo "Command state set to False to disable beacon" - echo "rebooting" - sudo reboot now +# echo "rebooting" +# sudo reboot now + sudo systemctl restart cubesatsim fi elif [ "$1" = "-R" ]; then