Merge pull request #409 from alanbjohnston/master-updated

Bug fixes in install script
master-psag
Alan Johnston 3 weeks ago committed by GitHub
commit 44e38efe57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2,6 +2,23 @@
echo -e "\ninstallation script for CubeSatSim v2.1\n"
if [[ $(grep 'bullseye' /etc/os-release) ]]; then
echo "Bullseye detected, installation continuing."
else
echo "Your Pi OS version is not Bullseye."
echo "The software installation will likely not work."
echo "See the README.md for how to install using Bullseye."
echo
echo "Are you sure you want to continue the installation (y/n)?"
read -r ANS
if [ "$ANS" = "n" ]; then
exit 1
fi
fi
FILE=/home/pi/CubeSatSim/sim.cfg
if [ -f "$FILE" ]; then
echo "$FILE exists."
@ -10,6 +27,13 @@ else
echo "AMSAT 1 0.0 0.0" > /home/pi/CubeSatSim/sim.cfg
fi
if [[ $(grep 'cubesatsim' /etc/motd) ]]; then
echo "motd already updated"
else
echo "updating motd"
sudo sh -c 'cat /home/pi/CubeSatSim/motd.txt >> /etc/motd'
fi
FILE=/home/pi/CubeSatSim/command_tx
if [ -f "$FILE" ]; then
echo "$FILE exists."
@ -56,7 +80,7 @@ sudo dpkg -i debian-template/wiringpi-2.61-1.deb
cd
#changed to python3-smbus
sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 libtiff5 python3-pil python3-serial libusb-1.0
sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 libtiff5 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev
sudo pip3 install --upgrade setuptools
@ -112,7 +136,7 @@ mkdir /home/pi/fctelem
mkdir /home/pi/fctelem/public_html
cd fctelem
wget https://github.com/alanbjohnston/go/releases/download/v0.2/fctelem.zip
unzip fctelem.zip
unzip -o fctelem.zip
cd
echo "Installing fcdctl to set FUNcubeDongle Pro gain"
@ -124,6 +148,8 @@ git clone https://github.com/csete/fcdctl.git
cd fcdctl
make fcdpp
cd
git clone https://github.com/alanbjohnston/PiSSTVpp.git
cd PiSSTVpp
@ -280,7 +306,7 @@ if [ $changed -eq 1 ]; then
echo -e "Current sim.cfg configuration file:"
echo
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11}
echo -e "\nCubeSatSim configuraation sim.cfg file updated to: \n"
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
echo
echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $n10 $n11
echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $n10 $n11 > /home/pi/CubeSatSim/sim.cfg

@ -0,0 +1,11 @@
This Raspberry Pi has the CubeSatSim v2.x software installed
and runs automatically as systemd cubesatsim.service. For more
information see https://CubeSatSim.org. To update
to the latest version, enter this command:
CubeSatSim/update
To see configuration options, enter this command:
CubeSatSim/config

@ -175,33 +175,6 @@ if [ ! -d "/home/pi/PiSSTVpp" ]; then
sudo raspi-config nonint do_camera 0
FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg
if [ ! -f "$FILE" ]; then
echo "Copying SSTV image 1."
cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg
fi
FILE=/home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg
if [ ! -f "$FILE" ]; then
echo "Copying SSTV image 2."
cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg
fi
# echo "You need to reboot to complete this update. Reboot now (y/n)?"
# read -r ANS
# if [ "$ANS" = "y" ]; then
# sudo reboot now
# else
# echo "The CubeSatSim software may not work correctly until you reboot."
# fi
fi
if [ ! -d "/home/pi/rpitx" ]; then
@ -228,7 +201,7 @@ if [ ! -d "/home/pi/WiringPi" ]; then
cd
git clone https://github.com/PinkFreud/WiringPi
git clone https://github.com/alanbjohnston/WiringPi
cd WiringPi
./build debian
@ -354,15 +327,15 @@ cd /home/pi/ssdv
sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt'
FLAG=1
cd /home/pi/pi-power-button
git pull --no-rebase
git checkout reboot-mode-change
script/install
# cd /home/pi/pi-power-button
# git pull --no-rebase
# git checkout reboot-mode-change
# script/install
# sudo apt-get update && sudo apt-get dist-upgrade -y
sudo apt-get update -y
sudo apt-get install -y libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 python3-pil
sudo pip3 install -y adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 pillow
## sudo apt-get update && sudo apt-get dist-upgrade -y
# sudo apt-get update -y
# sudo apt-get install -y libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 python3-pil
# sudo pip3 install -y adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 pillow
fi

Loading…
Cancel
Save

Powered by TurnKey Linux.