added auto reset

pull/109/head
Alan Johnston 5 years ago
parent f9a24c790f
commit c8c5d7c64e

@ -23,7 +23,7 @@ read callsign
if [ -z $callsign ] ; then
callsign="$1"
echo $callsign
echo "Keeping value of" $callsign
fi
echo -e "Input reset count (integer): "
@ -32,13 +32,13 @@ read resets
if [ -z $resets ] ; then
resets="$2"
echo $resets
echo "Keeping value of" $resets
fi
if ! [[ $resets =~ ^[0-9]+$ ]] ; then
echo "Error: not an integer!"
resets="$2"
echo $resets
echo "Keeping value of" $resets
fi
echo -e "Input latitude (decimal degrees, positive is north): "
@ -48,13 +48,14 @@ read lat
if [ -z $lat ] ; then
lat="$3"
echo $lat
echo "Keeping value of" $lat
fi
if ! [[ $lat =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then
echo "Error: not a number!"
lat="$3"
echo "Keeping value of" $lat
fi
echo -e "Input longitude (decimal degrees, positive is east): "
@ -64,13 +65,14 @@ read long
if [ -z $long ] ; then
long="$4"
echo $long
echo "Keeping value of" $long
fi
if ! [[ $long =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then
echo "Error: not a number!"
long="$4"
echo "Keeping value of" $long
fi
echo -e "\nCubeSatSim configuraation sim.cfg file updated to: \n"
@ -78,4 +80,8 @@ echo -e "\nCubeSatSim configuraation sim.cfg file updated to: \n"
echo $callsign $resets $lat $long
echo $callsign $resets $lat $long > sim.cfg
echo "Restarting CubeSatSim with new configuraation file"
sudo systemctl restart cubesatsim

Loading…
Cancel
Save

Powered by TurnKey Linux.