Update config added > /dev/null 2>&1

pull/327/head
Alan Johnston 1 year ago committed by GitHub
parent 19de595d4f
commit 4c02e60484
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -22,7 +22,7 @@ function transmit_command_aprs {
else else
STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a"
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
echo $STRING > /home/pi/CubeSatSim/t.txt echo $STRING > /home/pi/CubeSatSim/t.txt
echo echo
echo -n "Sending APRS packet to change mode to APRS" echo -n "Sending APRS packet to change mode to APRS"
@ -185,7 +185,7 @@ elif [ "$1" = "-a" ]; then
# echo "Transmit mode 1 is APRS" # echo "Transmit mode 1 is APRS"
# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" # STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a"
# sudo rm /home/pi/CubeSatSim/t.txt > /dev/null # sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
# echo $STRING > /home/pi/CubeSatSim/t.txt # echo $STRING > /home/pi/CubeSatSim/t.txt
# echo # echo
# echo -n "Sending APRS packet " # echo -n "Sending APRS packet "
@ -531,7 +531,7 @@ elif [ "$1" = "-T" ]; then
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
echo "Command and control set to OFF" echo "Command and control set to OFF"
sudo rm /home/pi/CubeSatSim/command_control > /dev/null sudo rm /home/pi/CubeSatSim/command_control > /dev/null 2>&1
# reboot=1 # reboot=1
echo "restarting command and control" echo "restarting command and control"
sudo systemctl restart command sudo systemctl restart command
@ -578,7 +578,7 @@ elif [ "$1" = "-d" ]; then
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
echo "Command and control Direwolf set to OFF" echo "Command and control Direwolf set to OFF"
sudo rm /home/pi/CubeSatSim/command_control_direwolf > /dev/null sudo rm /home/pi/CubeSatSim/command_control_direwolf > /dev/null 2>&1
# reboot=1 # reboot=1
## echo "rebooting" ## echo "rebooting"
sudo systemctl restart command sudo systemctl restart command
@ -645,7 +645,7 @@ elif [ "$1" = "-D" ]; then
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
echo "Transmit commands in APRS" echo "Transmit commands in APRS"
sudo rm /home/pi/CubeSatSim/transmit_dtmf > /dev/null sudo rm /home/pi/CubeSatSim/transmit_dtmf > /dev/null 2>&1
fi fi
else else
@ -676,7 +676,7 @@ elif [ "$1" = "-R" ]; then
echo echo
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
sudo rm /home/pi/CubeSatSim/command_count.txt > /dev/null sudo rm /home/pi/CubeSatSim/command_count.txt > /dev/null 2>&1
echo "Commands count reset to 0" echo "Commands count reset to 0"
echo "0\n" > /home/pi/CubeSatSim/command_count.txt echo "0\n" > /home/pi/CubeSatSim/command_count.txt
else else
@ -717,7 +717,7 @@ elif [ "$1" = "-B" ]; then
if [ "$mode" = "1" ] ; then if [ "$mode" = "1" ] ; then
echo "Safe Mode will be turned OFF. Battery saver mode will be turned OFF" echo "Safe Mode will be turned OFF. Battery saver mode will be turned OFF"
sudo rm /home/pi/CubeSatSim/battery_saver > /dev/null sudo rm /home/pi/CubeSatSim/battery_saver > /dev/null 2>&1
reboot=1 reboot=1
fi fi
fi fi
@ -1012,7 +1012,7 @@ elif [ "$1" = "-A" ]; then
sudo systemctl stop cubesatsim sudo systemctl stop cubesatsim
sudo systemctl stop rpitx sudo systemctl stop rpitx
# sudo rm /home/pi/CubeSatSim/t.txt > /dev/null # sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
sudo python3 -u /home/pi/CubeSatSim/rpitx.py x > /dev/null 2>&1 & # Force APRS mode sudo python3 -u /home/pi/CubeSatSim/rpitx.py x > /dev/null 2>&1 & # Force APRS mode
fi fi
@ -1052,7 +1052,7 @@ elif [ "$1" = "-A" ]; then
STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=?" STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=?"
;; ;;
esac esac
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
echo $STRING > /home/pi/CubeSatSim/t.txt echo $STRING > /home/pi/CubeSatSim/t.txt
echo echo
echo -n "Sending APRS packet " echo -n "Sending APRS packet "
@ -1066,7 +1066,7 @@ elif [ "$1" = "-A" ]; then
read sim read sim
echo echo
done done
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
# sudo systemctl restart cubesatsim # sudo systemctl restart cubesatsim
if [ "$1" != "n" ]; then if [ "$1" != "n" ]; then

Loading…
Cancel
Save

Powered by TurnKey Linux.