Update config added also-utils stop start on restart

pacsat-choose
Alan Johnston 11 months ago committed by GitHub
parent 846b231c66
commit 4fb667a68f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -399,12 +399,12 @@ elif [ "$1" = "-m" ]; then
if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then
FILE=/home/pi/CubeSatSim/battery_saver FILE=/home/pi/CubeSatSim/battery_saver
if [ -f "$FILE" ]; then if [ -f "$FILE" ]; then
restart=1 =1
else else
reboot=1 reboot=1
fi fi
else else
restart=1 =1
fi fi
fi fi
@ -422,7 +422,7 @@ elif [ "$1" = "-f" ]; then
echo "changing CubeSatSim to FSK mode" echo "changing CubeSatSim to FSK mode"
sudo echo "f" > /home/pi/CubeSatSim/.mode sudo echo "f" > /home/pi/CubeSatSim/.mode
restart=1 =1
fi fi
elif [ "$1" = "-b" ]; then elif [ "$1" = "-b" ]; then
@ -439,7 +439,7 @@ elif [ "$1" = "-b" ]; then
echo "changing CubeSatSim to BPSK mode" echo "changing CubeSatSim to BPSK mode"
sudo echo "b" > /home/pi/CubeSatSim/.mode sudo echo "b" > /home/pi/CubeSatSim/.mode
restart=1 =1
fi fi
elif [ "$1" = "-s" ]; then elif [ "$1" = "-s" ]; then
@ -460,12 +460,12 @@ elif [ "$1" = "-s" ]; then
FILE=/home/pi/CubeSatSim/battery_saver FILE=/home/pi/CubeSatSim/battery_saver
if [ -f "$FILE" ]; then if [ -f "$FILE" ]; then
restart=1 =1
else else
reboot=1 reboot=1
fi fi
else else
restart=1 =1
fi fi
fi fi
@ -513,7 +513,7 @@ elif [ "$1" = "-t" ]; then
reboot=1 reboot=1
## sudo reboot now ## sudo reboot now
# sudo restart cubesatsim # sudo cubesatsim
elif [ "$1" = "-c" ]; then elif [ "$1" = "-c" ]; then
@ -544,7 +544,7 @@ elif [ "$1" = "-c" ]; then
callsign="$1" callsign="$1"
echo "Keeping value of" $callsign echo "Keeping value of" $callsign
norestart=1 no=1
else else
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
@ -1537,6 +1537,9 @@ if [ "$restart" = "1" ] ; then
if [ "$reboot" = "0" ] ; then if [ "$reboot" = "0" ] ; then
echo "Restarting" echo "Restarting"
# sudo systemctl stop transmit # sudo systemctl stop transmit
sudo /etc/init.d/alsa-utils stop
sudo /etc/init.d/alsa-utils start
sudo systemctl restart cubesatsim sudo systemctl restart cubesatsim
sudo systemctl restart transmit sudo systemctl restart transmit
else else

Loading…
Cancel
Save

Powered by TurnKey Linux.