add some scripts

This commit is contained in:
2022-07-19 19:59:28 +03:00
parent 73bdcfb119
commit 3a649661b8
26 changed files with 482 additions and 43 deletions

23
Daemons/astrosib/STOPobs Normal file → Executable file
View File

@@ -2,26 +2,27 @@
# stop observation: close everything, turn of power etc
export http_proxy=""
echo "Turn OFF mount"
ssh obs@192.168.70.34 ~/bin/MOUNTpoweronoff
ssh obs@192.168.70.36 ~/bin/MOUNTpoweronoff
echo "Turn off camera TEC"
fli_control -t25
echo "Close telescope doors"
curl localhost:4444/close
COMDEV=/dev/ttyS0
stty -F $COMDEV -hupcl -opost -onlcr -isig -iexten -echo -echoe -echok -echoctl -echoke -icanon min 0 time 5
echo -ne "SHUTTERCLOSE?1,1,1,1,1\r" > $COMDEV
cat $COMDEV
echo -e "\n"
echo "Close dome"
curl localhost:55555/close
while true; do
ANS=$(curl localhost:55555/status 2>/dev/null)
echo "Status: $ANS"
[ $ANS = "closed" ] && break
[ $ANS = "3,3,0,0" ] && break
sleep 1
done
echo "Dome closed!"
while true; do
ANS=$(curl localhost:4444/status 2>/dev/null)
echo "Status: $ANS"
[ $ANS = "closed" ] && break
sleep 1
done
sleep 10
echo "Turn OFF hardware power"
ssh obs@192.168.70.34 ~/bin/HWpoweroff
ssh obs@192.168.70.36 ~/bin/HWpoweroff