Update config -d param

master-bo
Alan Johnston 2 months ago committed by GitHub
parent dcbd95f84a
commit 32e6d5a93b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -920,6 +920,8 @@ elif [ "$1" = "-d" ]; then
echo "Direwolf will not run unless one is plugged in."
fi
if [ -z "$param2" ] ; then
FILE=/home/pi/CubeSatSim/command_control_direwolf
if [ -f "$FILE" ]; then
echo "Radio command and control with Direwolf for DTMF and APRS is ON"
@ -931,10 +933,7 @@ elif [ "$1" = "-d" ]; then
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
echo "Command and control Direwolf set to OFF"
sudo rm /home/pi/CubeSatSim/command_control_direwolf > /dev/null 2>&1
# reboot=1
## echo "rebooting"
sudo systemctl restart command
## sudo reboot now
fi
else
@ -947,15 +946,10 @@ elif [ "$1" = "-d" ]; then
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
echo "Command and control Direwolf set to ON"
sudo touch /home/pi/CubeSatSim/command_control_direwolf
## echo "rebooting"
# reboot=1
sudo systemctl restart command
if [[ $(arecord -l | grep card) ]]; then
restart=1
### echo "restarting cubesatsim software"
### sudo systemctl restart cubesatsim
fi
## sudo reboot now
fi
fi
@ -963,7 +957,6 @@ elif [ "$1" = "-d" ]; then
FILE=/home/pi/CubeSatSim/command_control
if [ -f "$FILE" ]; then
echo
else
echo "Radio command and control is OFF"
echo
@ -975,11 +968,23 @@ elif [ "$1" = "-d" ]; then
echo "Command and control set to ON"
sudo touch /home/pi/CubeSatSim/command_control
echo "restarting command and control"
# reboot=1
sudo systemctl restart command
## sudo reboot now
fi
fi
else
reset="$param2"
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
echo "Command and control Direwolf set to ON"
sudo touch /home/pi/CubeSatSim/command_control_direwolf
sudo systemctl restart command
if [[ $(arecord -l | grep card) ]]; then
restart=1
fi
else
echo "Command and control Direwolf set to OFF"
sudo rm /home/pi/CubeSatSim/command_control_direwolf > /dev/null 2>&1
sudo systemctl restart command
fi
fi
elif [ "$1" = "-D" ]; then

Loading…
Cancel
Save

Powered by TurnKey Linux.