diff --git a/update b/update index a9188a67..3ae8add9 100755 --- a/update +++ b/update @@ -105,6 +105,22 @@ else FLAG=1 fi +FILE=/etc/systemd/system/pacsatsim.service +if [ -f "$FILE" ]; then + if [[ $(diff systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service) ]]; then + echo "changed command.service." + sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + FLAG=1 + else + echo "no change to pacsatsim.service." + fi +else + echo "creating pacsatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + sudo systemctl enable pacsatsim + FLAG=1 +fi + FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg if [ ! -f "$FILE" ]; then echo "Copying SSTV image 1."