forked from STI/Astroport.ONE
AstroID.json model & ZONE API birth
This commit is contained in:
parent
f7002dce99
commit
9d912e5247
|
@ -0,0 +1,54 @@
|
|||
################################################################################
|
||||
# Author: Fred (support@qo-op.com)
|
||||
# Version: 0.1
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
################################################################################
|
||||
################################################################################
|
||||
## API: ZONE
|
||||
## Used by OSM2IPFS map_render.html & other UPlanet Client App
|
||||
# ?zone=DEG&ulat=LAT&ulon=LON
|
||||
## Search for TW numbers in received zone
|
||||
# =
|
||||
################################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
. "${MY_PATH}/../tools/my.sh"
|
||||
|
||||
start=`date +%s`
|
||||
|
||||
echo "PORT=$1
|
||||
THAT=$2
|
||||
AND=$3
|
||||
THIS=$4
|
||||
APPNAME=$5
|
||||
WHAT=$6
|
||||
OBJ=$7
|
||||
VAL=$8
|
||||
MOATS=$9
|
||||
COOKIE=$10"
|
||||
PORT="$1" THAT="$2" AND="$3" THIS="$4" APPNAME="$5" WHAT="$6" OBJ="$7" VAL="$8" MOATS="$9" COOKIE="$10"
|
||||
### transfer variables according to script
|
||||
|
||||
HTTPCORS="HTTP/1.1 200 OK
|
||||
Access-Control-Allow-Origin: ${myASTROPORT}
|
||||
Access-Control-Allow-Credentials: true
|
||||
Access-Control-Allow-Methods: GET
|
||||
Server: Astroport.ONE
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
|
||||
"
|
||||
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||
|
||||
## CHECK FOR NOT PUBLISHING ALREADY (AVOID IPNS CRUSH)
|
||||
alreadypublishing=$(ps axf --sort=+utime | grep -w 'ipfs name publish --key=' | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
||||
if [[ ${alreadypublishing} ]]; then
|
||||
echo "$HTTPCORS ERROR - (╥☁╥ ) - IPFS ALREADY PUBLISHING RETRY LATER" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## START MANAGING UPLANET LAT/LON & PLAYER
|
||||
mkdir -p ~/.zen/tmp/${MOATS}/
|
||||
|
||||
|
||||
rm -Rf ~/.zen/tmp/${MOATS}/
|
||||
exit 0
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
@ -0,0 +1 @@
|
|||
[{"created":"20230227185225098","text":"","creator":"_PLAYER_","title":"AstroID","type":"image/png","modified":"20231009130017694","modifier":"_PLAYER_","tags":"$:/isAttachment _PLAYER_ $:/isIpfs G1AstroID","_canonical_uri":"/ipfs/bafybeifbebc3ewnzrzbm44arddedbralegnxklhua5d5ymzaqtf2kaub7i","PASS":"_PASS_","HPASS":"_HPASS_","g1pub":"_G1PUB_","astronautens":"_ASTRONAUTENS_"}]
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue