Compare commits
2 Commits
701757917a
...
bc118f2c81
Author | SHA1 | Date | |
---|---|---|---|
bc118f2c81 | |||
61342682ca |
@ -50,7 +50,12 @@ wait_for_trigger() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# APISM has al least two TCP-ports open: 7778 and 7779. To check for a running
|
||||||
|
# APISM it is therefore enough to check for the port 7778. netcat will return 0
|
||||||
|
# if the port 7778 is open.
|
||||||
check_for_apism() {
|
check_for_apism() {
|
||||||
|
return 0
|
||||||
|
|
||||||
nc localhost 7778
|
nc localhost 7778
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
return 0
|
return 0
|
||||||
@ -58,7 +63,50 @@ check_for_apism() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
######################### send_to_ismas.txt ###################################
|
||||||
|
# #M=GH_APP
|
||||||
|
# #C=REQ_ISMASParameter
|
||||||
|
# #J={}
|
||||||
|
# {
|
||||||
|
# "DEV_ID": {
|
||||||
|
# "Device_Type": "2020",
|
||||||
|
# "Custom_ID": 999,
|
||||||
|
# "Device_ID": 1
|
||||||
|
# },
|
||||||
|
# "REQ_ISMASParameter_#1": {}
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# APISM should respond with (something like this):
|
||||||
|
#
|
||||||
|
# {
|
||||||
|
# "REQ_ISMASPARAMETER#69553_Response": {
|
||||||
|
# "Aknoledge": "OK"
|
||||||
|
# },
|
||||||
|
# "Dev_ID": {
|
||||||
|
# "Device_Type": "ISMAS",
|
||||||
|
# "Custom_ID": 999,
|
||||||
|
# "Device_ID": 2
|
||||||
|
# },
|
||||||
|
# "Fileupload": [
|
||||||
|
# { "IPK": "BladiBlupp.Zip",
|
||||||
|
# "MD5": "01234567890123456789012345678901"}
|
||||||
|
# ],
|
||||||
|
# "Parameter": {
|
||||||
|
# "Location": "An der Bahn 11",
|
||||||
|
# "Group": "G1",
|
||||||
|
# "Zone": "Z1",
|
||||||
|
# "Name": "Bruno",
|
||||||
|
# "SecNumber": "0",
|
||||||
|
# "LastAcc": "1",
|
||||||
|
# "GPSLat": "49,6019",
|
||||||
|
# "GPSLon": "12,1258"
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# where the interesting part is contained in "FileUpload".
|
||||||
|
#
|
||||||
check_for_updates() {
|
check_for_updates() {
|
||||||
|
# ismas_response=$(cat send_to_ismas.txt; sleep 1) | nc localhost 7778)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,6 +217,9 @@ UpdateController() {
|
|||||||
echo "DEBUG no updates available"
|
echo "DEBUG no updates available"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "$(date +'%Y-%m-%d %T') fetching updates..."
|
||||||
|
exit 1
|
||||||
|
|
||||||
# Fetch new updates (using git)
|
# Fetch new updates (using git)
|
||||||
while :
|
while :
|
||||||
|
3
opkg.sh
3
opkg.sh
@ -10,7 +10,8 @@ write_config() {
|
|||||||
},
|
},
|
||||||
\"conf\" : {
|
\"conf\" : {
|
||||||
\"szeged/1/1/etc/psa_config/emp.conf\" : \"d41d8cd98f00b204e9800998ecf8427e\",
|
\"szeged/1/1/etc/psa_config/emp.conf\" : \"d41d8cd98f00b204e9800998ecf8427e\",
|
||||||
\"szeged/1/1/etc/psa_config/printer.conf\": \"d41d8cd98f00b204e9800998ecf8427e\"
|
\"szeged/1/1/etc/psa_config/printer.conf\": \"d41d8cd98f00b204e9800998ecf8427e\",
|
||||||
|
\"szeged/1/1/etc/psa_config/device.conf\" : \"d41d8cd98f00b204e9800998ecf8427e\"
|
||||||
},
|
},
|
||||||
\"opkg\" : {"
|
\"opkg\" : {"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user