2022-12-25 17:27:07 +01:00
|
|
|
#shellcheck shell=sh
|
2022-12-25 15:18:19 +01:00
|
|
|
|
|
|
|
template_register() {
|
2022-12-25 22:20:50 +01:00
|
|
|
[ -n "$isLAN" ] \
|
|
|
|
&& SED_SCRIPT='sed -e "s~<input type='"'hidden'"' name='"'salt'"' value='"'0'"'>~<input name='"'salt'"' value='"''"'>~g"
|
|
|
|
-e "s~<input type='"'hidden'"' name='"'pepper'"' value='"'0'"'>~<input name='"'pepper'"' value='"''"'>~g"' \
|
|
|
|
|| SED_SCRIPT='tee'
|
2022-12-25 23:46:35 +01:00
|
|
|
$RUN sed \
|
|
|
|
-e "s~\"http://127.0.0.1:1234/\"~\"${myIPFS}/\"~g" \
|
|
|
|
-e "s~\"http://127.0.0.1:1234\"~\"${myASTROPORT}\"~g" \
|
2022-12-25 22:20:50 +01:00
|
|
|
-e "s~http://127.0.0.1:8080~${myIPFS}~g" \
|
2022-12-25 23:46:35 +01:00
|
|
|
-e "s~http://127.0.0.1:12345~http://${myHOST}:12345~g" \
|
2022-12-25 22:20:50 +01:00
|
|
|
-e "s~_IPFSNODEID_~${IPFSNODEID}~g" \
|
|
|
|
-e "s~_HOSTNAME_~$(hostname)~g" \
|
|
|
|
-e "s~.000.~.$(printf '%03d' $(seq 0 17 |shuf -n 1)).~g" \
|
|
|
|
~/.zen/Astroport.ONE/templates/register.html | \
|
|
|
|
eval ${SED_SCRIPT:-tee}
|
2022-12-25 15:18:19 +01:00
|
|
|
}
|
2022-12-25 18:11:26 +01:00
|
|
|
|