(RE)ACTIVATE ipfs p2p tunnels = NextCloud FROM taurus TO oasis (https://taurus.copylaradio.com)

This commit is contained in:
qo-op 2021-06-04 03:38:21 +02:00
parent d533e8b6ac
commit 190770774c
2 changed files with 17 additions and 6 deletions

View File

@ -136,6 +136,9 @@ if [[ $(($minute % 15)) == 0 ]]; then
exit 1
fi
## (RE)ACTIVATE ipfs p2p tunnels
# NextCloud FROM taurus TO oasis (https://taurus.copylaradio.com)
$MY_PATH/zen/ipfs_P2P_forward.sh
########## CHATON : OPEN OR CLOSE SSH ACCESS #################
# [[ "$(ipfs p2p ls | grep $G1PUB-ssh)" == "" ]] && sleep $((1 + RANDOM % 10)) && ~/.zen/astrXbian/zen/ssh_forward2onelove.sh # OPEN-SSH
# [[ "$(ipfs p2p ls | grep $G1PUB-ssh)" != "" ]] && sleep $((1 + RANDOM % 10)) && ~/.zen/astrXbian/zen/ssh_forward2onelove.sh # CLOSE-SSH

View File

@ -18,24 +18,32 @@ IPFSADMINID=$(cat ~/.zen/astrXbian/A_swarm_admin.txt)
## OASIS acts as nginx proxy WITH localhost:2443 => taurus:443 (NextCloud)
# OASIS : /etc/nginx/sites-available/taurus.copylaradio.com.conf
# server {
# server_name taurus.copylaradio.com;
# server_name taurus.copylaradio.com;
#
# access_log /var/log/nginx/taurus-access.log;
# error_log /var/log/nginx/taurus-error.log;
#
# location / {
# proxy_pass https://127.0.0.1:2443;
# }
# }
# }
# + sudo certbot !!
# _____
#|_ _|_ _ _ _ _ __ _ _ ___
# | |/ _` | | | | '__| | | / __|
# | | (_| | |_| | | | |_| \__ \
# |_|\__,_|\__,_|_| \__,_|___/ NextCloud
#
# 12D3KooWRstYPJSakosgnvvGpxDdUJd2xAncJB7fbBwLBaTAEJxp
if [[ "$IPFSNODEID" == "12D3KooWRstYPJSakosgnvvGpxDdUJd2xAncJB7fbBwLBaTAEJxp" ]]; then
ipfs p2p listen /x/https-taurus /ip4/127.0.0.1/tcp/443
[[ ! $(ipfs p2p ls | grep '/x/https-taurus') ]] && ipfs p2p listen /x/https-taurus /ip4/127.0.0.1/tcp/443
fi
# OASIS /etc/nginx/sites-available/taurus.copylaradio.com.conf
# BRING TO OASIS /etc/nginx/sites-available/taurus.copylaradio.com.conf
if [[ "$IPFSNODEID" == "12D3KooWBYme2BsNUrtx4mEdNX6Yioa9AV7opWzQp6nrPs6ZKabN" ]]; then
ipfs p2p close -p /x/https-taurus
ipfs p2p forward /x/https-taurus /ip4/127.0.0.1/tcp/2443 /p2p/12D3KooWRstYPJSakosgnvvGpxDdUJd2xAncJB7fbBwLBaTAEJxp
[[ ! $(ipfs p2p ls | grep '/x/https-taurus') ]] && ipfs p2p forward /x/https-taurus /ip4/127.0.0.1/tcp/2443 /p2p/12D3KooWRstYPJSakosgnvvGpxDdUJd2xAncJB7fbBwLBaTAEJxp
fi
ipfs p2p ls