forked from axiom-team/astrXbian
Astroport layer for Xbian
This commit is contained in:
parent
d56393af34
commit
f4742bdc71
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=~/.zen/astroport/1stRUNconfig.sh
|
||||
Exec=~/.zen/astrXbian/1stRUNconfig.sh
|
||||
X-GNOME-Autostart-enabled=true
|
||||
NoDisplay=false
|
||||
Hidden=false
|
||||
|
|
|
@ -83,8 +83,8 @@ sudo systemctl daemon-reload || err "Restart IPFS"
|
|||
sudo systemctl enable ipfs || err "Enable IPFS daemon"
|
||||
|
||||
## Special Xbian init.d config
|
||||
if [[ $USER == "xbian" && -f ~/.zen/astroport/.install/templates/ipfs/ipfs-initV.sh ]]; then
|
||||
sudo cp ~/.zen/astroport/.install/templates/ipfs/ipfs-initV.sh /etc/init.d/ipfs
|
||||
if [[ $USER == "xbian" && -f ~/.zen/astrXbian/.install/templates/ipfs/ipfs-initV.sh ]]; then
|
||||
sudo cp ~/.zen/astrXbian/.install/templates/ipfs/ipfs-initV.sh /etc/init.d/ipfs
|
||||
sudo chmod 755 /etc/init.d/ipfs
|
||||
sudo touch /var/log/ipfs.log && chown xbian /var/log/ipfs.log
|
||||
sudo service ipfs enable
|
||||
|
|
|
@ -67,7 +67,7 @@ if [[ ! $(which mpd) ]]; then
|
|||
sudo apt-get install ca-certificates git-core binutils rsync alsa-utils bc espeak mpg321 fuse atomicparsley -y || err=1
|
||||
|
||||
## CONFIG MPD
|
||||
sudo cp -f /home/$YOU/.zen/astroport/.install/templates/copylaradio/mpd.conf /etc/mpd.conf
|
||||
sudo cp -f /home/$YOU/.zen/astrXbian/.install/templates/copylaradio/mpd.conf /etc/mpd.conf
|
||||
sudo sed -i "s/_USER_/$YOU/g" /etc/mpd.conf || err=1
|
||||
mkdir ~/.config/mpd && sudo cp -f /etc/mpd.conf ~/.config/mpd/mpd.conf && sudo chown $YOU ~/.config/mpd/mpd.conf
|
||||
|
||||
|
@ -105,7 +105,7 @@ myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
|||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
|
||||
# Ask to the router its name (BOX DNS or system defined)
|
||||
[[ -f /home/$YOU/.zen/astroport/zen/tools/nodename ]] && NODENAME=$(/home/$YOU/.zen/astroport/zen/tools/nodename) \
|
||||
[[ -f /home/$YOU/.zen/astrXbian/zen/tools/nodename ]] && NODENAME=$(/home/$YOU/.zen/astrXbian/zen/tools/nodename) \
|
||||
|| NODENAME=$(curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/nodename | bash) ## RUNNING ALONE !!
|
||||
|
||||
echo $NODENAME
|
||||
|
@ -151,7 +151,7 @@ Portal
|
|||
###
|
||||
echo "INSTALL LOVELand WebSite. Linking to /var/www ..."
|
||||
if [[ ! -L /var/www/loveland ]]; then
|
||||
sudo ln -s /home/$YOU/.zen/astroport/www/LOVELand /var/www/loveland
|
||||
sudo ln -s /home/$YOU/.zen/astrXbian/www/LOVELand /var/www/loveland
|
||||
fi
|
||||
|
||||
echo "JUKEBOX init"
|
||||
|
@ -167,7 +167,7 @@ echo "$NODENAME" > /home/$YOU/.zen/ipfs/.$IPFSNODEID/G1SSB/_nodename
|
|||
|
||||
PHPVERSION=$(ps auxf | grep php-fpm | grep -v -E 'color=auto|grep' | head -n 1 | grep -oP '(?<=\().*(?=\))' | awk -F '/' '{print $4}')
|
||||
### ASTROPORT STATION LOVELAND PORTAL
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astroport/www/loveland.conf > /tmp/loveland.conf
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astrXbian/www/loveland.conf > /tmp/loveland.conf
|
||||
sudo sed -i "s/_MY_NODE_NAME_/$NODENAME/g" /tmp/loveland.conf
|
||||
sudo sed -i "s/_PORT_/10010/g" /tmp/loveland.conf
|
||||
sudo sed -i "s/_APPLI_//g" /tmp/loveland.conf
|
||||
|
@ -175,14 +175,14 @@ sudo cp -f /tmp/loveland.conf /etc/nginx/conf.d/loveland.conf
|
|||
|
||||
### GCHANGE G1 Zen
|
||||
sudo rm -f /etc/nginx/conf.d/gchange.conf
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astroport/www/loveland.conf > /tmp/gchange.conf
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astrXbian/www/loveland.conf > /tmp/gchange.conf
|
||||
sudo sed -i "s/_MY_NODE_NAME_/$NODENAME/g" /tmp/gchange.conf
|
||||
sudo sed -i "s/_PORT_/10020/g" /tmp/gchange.conf
|
||||
sudo sed -i "s/_APPLI_/gchange/g" /tmp/gchange.conf
|
||||
sudo cp -f /tmp/gchange.conf /etc/nginx/conf.d/gchange.conf
|
||||
|
||||
### CESIUM G1 Zen
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astroport/www/loveland.conf > /tmp/cesium.conf
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astrXbian/www/loveland.conf > /tmp/cesium.conf
|
||||
sudo sed -i "s/_MY_NODE_NAME_/$NODENAME/g" /tmp/cesium.conf
|
||||
sudo sed -i "s/_PORT_/10030/g" /tmp/cesium.conf
|
||||
sudo sed -i "s/_APPLI_/cesium/g" /tmp/cesium.conf
|
||||
|
@ -190,7 +190,7 @@ sudo cp -f /tmp/cesium.conf /etc/nginx/conf.d/cesium.conf
|
|||
|
||||
### JUKEBOX RompR CopyLaRadio
|
||||
if [[ $(which mpd) ]]; then
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astroport/www/loveland.conf > /tmp/jukebox.conf
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astrXbian/www/loveland.conf > /tmp/jukebox.conf
|
||||
sudo sed -i "s/_MY_NODE_NAME_/$NODENAME/g" /tmp/jukebox.conf
|
||||
sudo sed -i "s/_PORT_/10011/g" /tmp/jukebox.conf
|
||||
sudo sed -i "s/_APPLI_/jukebox/g" /tmp/jukebox.conf
|
||||
|
@ -199,7 +199,7 @@ fi
|
|||
|
||||
### SSB OASIS Zen (PROXY MODE 10040 -> 3000)
|
||||
if [[ $(which oasis) ]]; then
|
||||
sudo sed "s/_MY_NODE_NAME_/$NODENAME/g" /home/$YOU/.zen/astroport/www/oasis.conf > /tmp/oasis.conf
|
||||
sudo sed "s/_MY_NODE_NAME_/$NODENAME/g" /home/$YOU/.zen/astrXbian/www/oasis.conf > /tmp/oasis.conf
|
||||
sudo sed -i "s/_PORT_/10040/g" /tmp/oasis.conf
|
||||
sudo sed -i "s/_LHOST_/$NODENAME:3000/g" /tmp/oasis.conf
|
||||
sudo sed -i "s/_APPLI_//g" /tmp/oasis.conf
|
||||
|
@ -212,14 +212,14 @@ fi
|
|||
### G1SMS propagation to localhost:10099 / 10097 ("ipfs p2p" forwarded)
|
||||
if [[ $(which gammu) ]]; then
|
||||
# DIRECT MODE
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astroport/www/loveland.conf > /tmp/g1sms.conf
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astrXbian/www/loveland.conf > /tmp/g1sms.conf
|
||||
sudo sed -i "s/_MY_NODE_NAME_/$NODENAME/g" /tmp/g1sms.conf
|
||||
sudo sed -i "s/_PORT_/10099/g" /tmp/g1sms.conf
|
||||
sudo sed -i "s/_APPLI_/g1sms/g" /tmp/g1sms.conf
|
||||
sudo cp -f /tmp/g1sms.conf /etc/nginx/conf.d/g1sms.conf
|
||||
else
|
||||
# PROXY MODE (10099 -> 10097) ### ipfs p2p PROPAGATION WITH 'zen/ipfs_OPEN_ports.sh'
|
||||
sudo sed "s/_MY_NODE_NAME_/$NODENAME/g" /home/$YOU/.zen/astroport/www/oasis.conf > /tmp/g1sms_proxy.conf
|
||||
sudo sed "s/_MY_NODE_NAME_/$NODENAME/g" /home/$YOU/.zen/astrXbian/www/oasis.conf > /tmp/g1sms_proxy.conf
|
||||
sudo sed -i "s/_PORT_/10099/g" /tmp/g1sms_proxy.conf
|
||||
sudo sed -i "s/_LHOST_/127\.0\.0\.1\:10097/g" /tmp/g1sms_proxy.conf
|
||||
sudo sed -i "s/_APPLI_/g1sms/g" /tmp/g1sms_proxy.conf
|
||||
|
|
|
@ -73,7 +73,7 @@ if [[ ! $(which mpd) ]]; then
|
|||
sudo apt-get install ca-certificates git-core binutils rsync alsa-utils bc espeak mpg321 fuse atomicparsley -y || err=1
|
||||
|
||||
## CONFIG MPD
|
||||
sudo cp -f /home/$YOU/.zen/astroport/.install/templates/copylaradio/mpd.conf /etc/mpd.conf
|
||||
sudo cp -f /home/$YOU/.zen/astrXbian/.install/templates/copylaradio/mpd.conf /etc/mpd.conf
|
||||
sudo sed -i "s/_USER_/$YOU/g" /etc/mpd.conf || err=1
|
||||
mkdir ~/.config/mpd && sudo cp -f /etc/mpd.conf ~/.config/mpd/mpd.conf && sudo chown $YOU ~/.config/mpd/mpd.conf
|
||||
|
||||
|
@ -111,7 +111,7 @@ myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
|||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
|
||||
# Ask to the router its name (BOX DNS or system defined)
|
||||
[[ -f /home/$YOU/.zen/astroport/zen/tools/nodename ]] && NODENAME=$(/home/$YOU/.zen/astroport/zen/tools/nodename) \
|
||||
[[ -f /home/$YOU/.zen/astrXbian/zen/tools/nodename ]] && NODENAME=$(/home/$YOU/.zen/astrXbian/zen/tools/nodename) \
|
||||
|| NODENAME=$(curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/nodename | bash) ## RUNNING ALONE !!
|
||||
|
||||
echo $NODENAME
|
||||
|
@ -130,7 +130,7 @@ Portal
|
|||
###
|
||||
echo "INSTALL LOVELand WebSite. Linking to /var/www ..."
|
||||
if [[ ! -L /var/www/loveland ]]; then
|
||||
sudo ln -s /home/$YOU/.zen/astroport/www/LOVELand /var/www/loveland
|
||||
sudo ln -s /home/$YOU/.zen/astrXbian/www/LOVELand /var/www/loveland
|
||||
fi
|
||||
|
||||
echo "JUKEBOX init"
|
||||
|
@ -148,7 +148,7 @@ PHPVERSION=$(ps auxf | grep php-fpm | grep -v -E 'color=auto|grep' | head -n 1 |
|
|||
|
||||
### JUKEBOX RompR CopyLaRadio
|
||||
if [[ $(which mpd) ]]; then
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astroport/www/loveland.conf > /tmp/jukebox.conf
|
||||
sudo sed "s/_PHPVERSION_/$PHPVERSION/g" /home/$YOU/.zen/astrXbian/www/loveland.conf > /tmp/jukebox.conf
|
||||
sudo sed -i "s/_MY_NODE_NAME_/$NODENAME/g" /tmp/jukebox.conf
|
||||
sudo sed -i "s/_PORT_/80/g" /tmp/jukebox.conf
|
||||
sudo sed -i "s/_APPLI_/jukebox/g" /tmp/jukebox.conf
|
||||
|
|
|
@ -28,8 +28,8 @@ fi
|
|||
|
||||
## Atroport config
|
||||
echo -e "${c_yellow}Getting local hostname...$c_"
|
||||
nc_domain=$(/home/$YOU/.zen/astroport/zen/tools/nodename)
|
||||
templates="/home/$YOU/.zen/astroport/.install/nextcloud/templates"
|
||||
nc_domain=$(/home/$YOU/.zen/astrXbian/zen/tools/nodename)
|
||||
templates="/home/$YOU/.zen/astrXbian/.install/nextcloud/templates"
|
||||
|
||||
## Set var
|
||||
[[ -z $nc_domain ]] && nc_domain=$1
|
||||
|
|
|
@ -24,7 +24,7 @@ echo "YOU=$YOU" >> ~/.bashrc
|
|||
echo "G1PUB=$G1PUB" >> ~/.bashrc
|
||||
echo "IPFSNODEID=$IPFSNODEID" >> ~/.bashrc
|
||||
## Add jaklis/.env ?
|
||||
# cat ~/.zen/astroport/zen/jaklis/.env >> ~/.bashrc
|
||||
# cat ~/.zen/astrXbian/zen/jaklis/.env >> ~/.bashrc
|
||||
|
||||
source ~/.bashrc
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ zenity --question --width 300 --text "Initialiser votre station Astroport?" 2> >
|
|||
|
||||
########################################################################
|
||||
# LOGIN (=SALT)
|
||||
salt="$(~/.zen/astroport/zen/tools/diceware.sh 3 | xargs)"
|
||||
salt="$(~/.zen/astrXbian/zen/tools/diceware.sh 3 | xargs)"
|
||||
# PASS (=PEPPER)
|
||||
pepper="$(~/.zen/astroport/zen/tools/diceware.sh 3 | xargs)"
|
||||
pepper="$(~/.zen/astrXbian/zen/tools/diceware.sh 3 | xargs)"
|
||||
|
||||
g1_profil=$(zenity --entry --width 300 --text "Nom de votre machine" --title "Astroport -- Profil" --entry-text="$(hostname)" 2> >(grep -v 'GtkDialog' >&2));
|
||||
g1_salt=$(zenity --entry --width 300 --text "Identifiant gchange/cesium (sel)" --title "Astroport - Sel" --entry-text="$salt" 2> >(grep -v 'GtkDialog' >&2));
|
||||
|
@ -47,7 +47,7 @@ cat /tmp/secret.june >> /tmp/secret.all
|
|||
|
||||
########################################################################
|
||||
echo "CREATING /tmp/secret.dunikey"
|
||||
python3 ~/.zen/astroport/zen/tools/key_create_dunikey.py "$g1_salt" "$g1_pepper"
|
||||
python3 ~/.zen/astrXbian/zen/tools/key_create_dunikey.py "$g1_salt" "$g1_pepper"
|
||||
|
||||
g1pub=$(cat /tmp/secret.dunikey | grep "pub" | cut -d ' ' -f 2)
|
||||
g1sec=$(cat /tmp/secret.dunikey | grep "sec" | cut -d ' ' -f 2)
|
||||
|
@ -60,7 +60,7 @@ echo "" >> /tmp/secret.all
|
|||
|
||||
########################################################################
|
||||
echo "CREATING /tmp/config.ipfs"
|
||||
ipfs_ID=$(python3 ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py)
|
||||
ipfs_ID=$(python3 ~/.zen/astrXbian/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py)
|
||||
|
||||
echo $ipfs_ID > /tmp/secret.ipfs && source /tmp/secret.ipfs
|
||||
jq -r --arg PeerID "$PeerID" '.Identity.PeerID=$PeerID' ~/.ipfs/config > /tmp/config.tmp
|
||||
|
@ -103,8 +103,8 @@ rm /tmp/secret.all
|
|||
echo "IPFS_SYNC_DIR=$IPFS_sync_directory" > ~/.zen/ipfs.sync
|
||||
|
||||
# CREATE gchange+ profile
|
||||
# cd ~/.zen/astroport/zen/jaklis
|
||||
# ./jaklis.py --key "~/.zen/secret.dunikey" --node "https://data.gchange.fr" set --name "$g1_profil" --avatar "~/.zen/astroport/logo.png"
|
||||
# cd ~/.zen/astrXbian/zen/jaklis
|
||||
# ./jaklis.py --key "~/.zen/secret.dunikey" --node "https://data.gchange.fr" set --name "$g1_profil" --avatar "~/.zen/astrXbian/logo.png"
|
||||
# ERROR
|
||||
|
||||
echo "OK. Restart now"
|
||||
|
|
28
ISOconfig.sh
28
ISOconfig.sh
|
@ -20,7 +20,7 @@ if [[ -f ~/.zen/ipfs.sync ]]; then
|
|||
echo "CONFIG ALREADY DONE"
|
||||
source ~/.zen/ipfs.sync
|
||||
# NEW BOOT! SEND ipfstryme message to my friends...
|
||||
cd ~/.zen/astroport/zen/jaklis
|
||||
cd ~/.zen/astrXbian/zen/jaklis
|
||||
# GET LIST of issuer(s) who likes me
|
||||
for liking_me in $(./jaklis.py like | jq -r '.likes[].issuer');
|
||||
do
|
||||
|
@ -40,9 +40,9 @@ ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && echo ok
|
|||
########################################################################
|
||||
echo "CREATING Gchange credentials"
|
||||
########################################################################
|
||||
salt="$(~/.zen/astroport/zen/tools/diceware.sh 3 | xargs)"
|
||||
salt="$(~/.zen/astrXbian/zen/tools/diceware.sh 3 | xargs)"
|
||||
[[ $salt == "" ]] && echo "ERROR" && exit 1
|
||||
pepper="$(~/.zen/astroport/zen/tools/diceware.sh 3 | xargs)"
|
||||
pepper="$(~/.zen/astrXbian/zen/tools/diceware.sh 3 | xargs)"
|
||||
|
||||
g1_profil=$(hostname)
|
||||
g1_salt="$salt"
|
||||
|
@ -56,7 +56,7 @@ echo "$g1_pepper" >> /tmp/secret.june
|
|||
########################################################################
|
||||
echo "CREATING /tmp/secret.dunikey"
|
||||
########################################################################
|
||||
python3 ~/.zen/astroport/zen/tools/key_create_dunikey.py "$g1_salt" "$g1_pepper"
|
||||
python3 ~/.zen/astrXbian/zen/tools/key_create_dunikey.py "$g1_salt" "$g1_pepper"
|
||||
|
||||
g1pub=$(cat /tmp/secret.dunikey | grep "pub" | cut -d ' ' -f 2)
|
||||
g1sec=$(cat /tmp/secret.dunikey | grep "sec" | cut -d ' ' -f 2)
|
||||
|
@ -65,7 +65,7 @@ g1sec=$(cat /tmp/secret.dunikey | grep "sec" | cut -d ' ' -f 2)
|
|||
########################################################################
|
||||
echo "CREATING /tmp/config.ipfs"
|
||||
########################################################################
|
||||
ipfs_ID=$(python3 ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py)
|
||||
ipfs_ID=$(python3 ~/.zen/astrXbian/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py)
|
||||
echo $ipfs_ID > /tmp/secret.ipfs && source /tmp/secret.ipfs
|
||||
[[ $PrivKEY == "" ]] && echo "ERROR" && exit 1
|
||||
jq -r --arg PeerID "$PeerID" '.Identity.PeerID=$PeerID' ~/.ipfs/config > /tmp/config.tmp
|
||||
|
@ -106,7 +106,7 @@ mkdir -p ~/.zen/ipfs/.${IPFSNODEID}/G1SSB
|
|||
# Give $XZUID to your (gchange friends) to add in Vstream Astroport and access your sharings
|
||||
# IPNS link to "pastebin list" http://localhost:8080/ipns/$IPNSKEY/xbian/$XZUID
|
||||
########################################################################
|
||||
XZUID=$(~/.zen/astroport/zen/tools/diceware.sh 1 | xargs)-$(~/.zen/astroport/zen/tools/diceware.sh 1 | xargs)$(hostname -I | cut -d ' ' -f 1 | cut -d "." -f 4 )
|
||||
XZUID=$(~/.zen/astrXbian/zen/tools/diceware.sh 1 | xargs)-$(~/.zen/astrXbian/zen/tools/diceware.sh 1 | xargs)$(hostname -I | cut -d ' ' -f 1 | cut -d "." -f 4 )
|
||||
echo "CREATE ~/.zen/ipfs/xbian/$XZUID"
|
||||
touch ~/.zen/ipfs/xbian/$XZUID
|
||||
# https://github.com/Kodi-vStream/venom-xbmc-addons/wiki/Voir-et-partager-sa-biblioth%C3%A8que-priv%C3%A9e#d%C3%A9clarer-des-films
|
||||
|
@ -116,8 +116,8 @@ echo "$XZUID" > ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid
|
|||
########################################################################
|
||||
echo "CREATE gchange+ profile"
|
||||
########################################################################
|
||||
cd ~/.zen/astroport/zen/jaklis
|
||||
./jaklis.py set --name "$XZUID" --avatar "$HOME/.zen/astroport/logo.png"
|
||||
cd ~/.zen/astrXbian/zen/jaklis
|
||||
./jaklis.py set --name "$XZUID" --avatar "$HOME/.zen/astrXbian/logo.png"
|
||||
|
||||
########################################################################
|
||||
########################################################################
|
||||
|
@ -137,10 +137,10 @@ ipfs swarm peers
|
|||
########################################################################
|
||||
echo 'EXTEND ~/.bashrc'
|
||||
########################################################################
|
||||
~/.zen/astroport/.install/update_bashrc.sh
|
||||
~/.zen/astrXbian/.install/update_bashrc.sh
|
||||
|
||||
echo "Configure .kodi/addons/plugin.video.vstream/resources/sites/astroport.py"
|
||||
cp -f ~/.zen/astroport/.install/.kodi/addons/plugin.video.vstream/resources/sites/astroport.py \
|
||||
cp -f ~/.zen/astrXbian/.install/.kodi/addons/plugin.video.vstream/resources/sites/astroport.py \
|
||||
~/.kodi/addons/plugin.video.vstream/resources/sites/astroport.py
|
||||
|
||||
# CREATE xbian IPNSKEY used to publish ~/.zen/ipfs_swarm/xbian (contains all XZUID pastebin files)
|
||||
|
@ -151,8 +151,8 @@ sed -i s/_PROFIL_/$XZUID/g ~/.kodi/addons/plugin.video.vstream/resources/sites/a
|
|||
sed -i s/_LOGIN_/$salt/g ~/.kodi/addons/plugin.video.vstream/resources/sites/astroport.py
|
||||
sed -i s/_MDP_/$pepper/g ~/.kodi/addons/plugin.video.vstream/resources/sites/astroport.py
|
||||
|
||||
~/.zen/astroport/zen/gchange_IPFS_swarm.sh
|
||||
~/.zen/astroport/zen/ipfs_SWARM_refresh.sh
|
||||
~/.zen/astrXbian/zen/gchange_IPFS_swarm.sh
|
||||
~/.zen/astrXbian/zen/ipfs_SWARM_refresh.sh
|
||||
|
||||
# Optionnal PUBLISH actual (later done by cron_MINUTE.sh)
|
||||
IXBIAN=$(ipfs add -qr ~/.zen/ipfs_swarm/xbian | tail -n 1)
|
||||
|
@ -174,9 +174,9 @@ echo 'SEND ipfstryme to oasis' # Add your bootstrap Pub here
|
|||
########################################################################
|
||||
echo 'INSTALL Astroport cron_MINUTE'
|
||||
########################################################################
|
||||
~/.zen/astroport/zen/tools/cron_VRFY.sh
|
||||
~/.zen/astrXbian/zen/tools/cron_VRFY.sh
|
||||
|
||||
# Run only once: comment /etc/rc.local (su - xbian -c "~/.zen/astroport/ISOconfig.sh")
|
||||
# Run only once: comment /etc/rc.local (su - xbian -c "~/.zen/astrXbian/ISOconfig.sh")
|
||||
# sudo sed -i s/su/\#su/g /etc/rc.local
|
||||
# BETTER NOT: Send new 'ipfstryme' message on each boot is done instead
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ echo '
|
|||
if [[ $dayoftheweek == 0 ]]; then
|
||||
$MY_PATH/zen/gchange_INIT.sh &
|
||||
# ACTIVATE IF CRON LOGGING
|
||||
#tar cvzf ~/.zen/astroport.$weeknumber.log.tgz /tmp/astroport.log # LOG BACKUP FOR 1 YEAR !!
|
||||
#tar cvzf ~/.zen/astrXbian.$weeknumber.log.tgz /tmp/astroport.log # LOG BACKUP FOR 1 YEAR !!
|
||||
fi
|
||||
#### DESYNC
|
||||
sleep $((1 + RANDOM % 5))
|
||||
|
|
|
@ -40,7 +40,7 @@ curl -s $gitpath/.install/loveland.sh | bash || exit 1
|
|||
|
||||
# Customs install
|
||||
## Nextcloud
|
||||
[[ $args =~ nextcloud ]] && cd /home/$USER/.zen/astroport && sudo -E bash .install/nextcloud/install.sh
|
||||
[[ $args =~ nextcloud ]] && cd /home/$USER/.zen/astrXbian && sudo -E bash .install/nextcloud/install.sh
|
||||
|
||||
echo -e "${c_green}Installation complete$c_"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
```
|
||||
~/.zen # Astroport Metaverse Files
|
||||
~/.zen/astroport # CODE
|
||||
~/.zen/astrXbian # CODE
|
||||
~/.zen/secret.astroport.key # MULTI UNIVERSE KEY
|
||||
|
||||
~/.zen/cache/g1_TX_inputs/ # G1 Wallet INPUT Tx cache
|
||||
|
@ -124,6 +124,6 @@ IPFS SWARM :
|
|||
# natools CRYPT/DECRYPT a FILE
|
||||
```
|
||||
g1pub=$(cat ~/.ssb/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||
~/.zen/astroport/zen/tools/natools.py encrypt -p $g1pub -i file -o file.crypt
|
||||
~/.zen/astroport/zen/tools/natools.py decrypt -f pubsec -k ~/.ssb/secret.dunikey -i file.crypt -o file
|
||||
~/.zen/astrXbian/zen/tools/natools.py encrypt -p $g1pub -i file -o file.crypt
|
||||
~/.zen/astrXbian/zen/tools/natools.py decrypt -f pubsec -k ~/.ssb/secret.dunikey -i file.crypt -o file
|
||||
```
|
||||
|
|
|
@ -102,7 +102,7 @@ NODEIPNS=$(ipfs name publish --allow-offline --quieter /ipfs/$IWALLETS)
|
|||
###
|
||||
# GET ALL MY CESIUMPLUS FRIENDS AND SEND THEM my IPFS Address
|
||||
|
||||
cd ~/.zen/astroport/zen/jaklis
|
||||
cd ~/.zen/astrXbian/zen/jaklis
|
||||
# GET LIST of issuer(s) who likes me
|
||||
for liking_me in $(./jaklis.py like | jq -r '.likes[].issuer');
|
||||
do
|
||||
|
|
|
@ -103,7 +103,7 @@ NODEIPNS=$(ipfs name publish --allow-offline --quieter /ipfs/$IWALLETS)
|
|||
###
|
||||
# GET ALL MY GCHANGE FRIENDS AND SEND THEM my IPFS Address
|
||||
|
||||
cd ~/.zen/astroport/zen/jaklis
|
||||
cd ~/.zen/astrXbian/zen/jaklis
|
||||
# GET LIST of issuer(s) who likes me
|
||||
for liking_me in $(./jaklis.py like | jq -r '.likes[].issuer');
|
||||
do
|
||||
|
|
|
@ -42,7 +42,7 @@ friend_of_mine_count=0
|
|||
########################################################################
|
||||
# Let's look for Friends and "IPFS swarm connect" with them
|
||||
########################################################################
|
||||
cd ~/.zen/astroport/zen/jaklis
|
||||
cd ~/.zen/astrXbian/zen/jaklis
|
||||
# 1. Get Gchange "liking_me" people list
|
||||
for liking_me in $(./jaklis.py like | jq -r '.likes[].issuer');
|
||||
do
|
||||
|
@ -66,7 +66,7 @@ do
|
|||
ipfsadd=$((ipfsadd+1))
|
||||
done;
|
||||
|
||||
#g1id=$(~/.zen/astroport/zen/tools/ipfs_to_g1.py "$ipfsnodeid")
|
||||
#g1id=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py "$ipfsnodeid")
|
||||
#echo "G1 ID : $g1id"
|
||||
|
||||
if [[ $friend_of_mine != null ]]; then
|
||||
|
@ -106,7 +106,7 @@ echo
|
|||
## Could send message to friends with 'ipfstryme' message
|
||||
for line in $(cat ~/.zen/A_liking_me_NO_ipfstryme.txt | uniq); do
|
||||
echo "Liking each other, but no ipfstryme received..."
|
||||
echo "cd ~/.zen/astroport/zen/jaklis"
|
||||
echo "cd ~/.zen/astrXbian/zen/jaklis"
|
||||
echo "./jaklis.py send -d $line -t 'Astroport' -m 'Rejoins mon #Swarm0 https://copylaradio.com'"
|
||||
done
|
||||
|
||||
|
|
Binary file not shown.
|
@ -145,7 +145,7 @@ $id : $type : $size bits
|
|||
|
||||
"
|
||||
# NOT WORKING, sudo inside !!!
|
||||
#nodename=$(~/.zen/astroport/zen/tools/nodename)
|
||||
#nodename=$(~/.zen/astrXbian/zen/tools/nodename)
|
||||
nodename=$(cat /home/$YOU/.zen/ipfs/.$IPFSNODEID/G1SSB/_nodename)
|
||||
if [[ $nodename == "" ]]; then
|
||||
nodename=$(cat /etc/hostname)
|
||||
|
|
|
@ -24,7 +24,7 @@ ME="${0##*/}"
|
|||
## CONNECT GLOBAL "ipfs.io" ## DANGEROUS only for short time...
|
||||
########################################################################
|
||||
# ADD ipfs.io public bootstrap into your swarm peers
|
||||
# RUN: cat ~/.zen/astroport/ipfs.swarm.ipfs.io | ipfs swarm connect
|
||||
# RUN: cat ~/.zen/astrXbian/ipfs.swarm.ipfs.io | ipfs swarm connect
|
||||
# SOON ipfs swarm peers will GROW!!! YOU ARE VSIBLE !!!
|
||||
# RUN: sudo systemctl restart ipfs # GOES BACK TO SWARM0
|
||||
########################################################################
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
# Author: Fred (support@qo-op.com)
|
||||
# Version: 1.0
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
########################################################################
|
||||
# This script convert secret.dunikey into ~/.ssb/secret.ssb
|
||||
########################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
########################################################################
|
||||
# \\///
|
||||
# qo-op
|
||||
#############
|
||||
DUNIKEYFILE="$1"
|
||||
[[ ! ${DUNIKEYFILE} ]] && DUNIKEYFILE="/tmp/secret.dunikey"
|
||||
[[ ! ${DUNIKEYFILE} ]] && DUNIKEYFILE="~/.ssb/secret.dunikey"
|
||||
[[ ! -f ${DUNIKEYFILE} ]] && echo "ERROR secret.dunikey unfound" && exit 1
|
||||
|
||||
pub=$(cat ${DUNIKEYFILE} | grep "pub" | cut -d ' ' -f 2)
|
||||
priv=$(cat ${DUNIKEYFILE} | grep "sec" | cut -d ' ' -f 2)
|
||||
ssbpub=$(echo $pub | base58 -d | base64)
|
||||
ssbpriv=$(echo $priv | base58 -d | base64 | tr -d "\n")
|
||||
|
||||
cat > /tmp/secret.ssb <<EOF
|
||||
# This secret generated by duniter2secret.sh
|
||||
# G1 Wallet ACCOUNT BALANCE:
|
||||
# silkaj balance $pub
|
||||
#
|
||||
# THIS KEY IS YOURS!
|
||||
# NEVER show this to anyone!!!
|
||||
|
||||
{
|
||||
"curve": "ed25519",
|
||||
"public": "$ssbpub.ed25519",
|
||||
"private": "$ssbpriv.ed25519",
|
||||
"id": "@$ssbpub.ed25519"
|
||||
}
|
||||
EOF
|
||||
|
||||
echo 'Your key is located in /tmp/secret.ssb'
|
||||
exit 0
|
|
@ -32,28 +32,28 @@ if [[ "$salt" == "" && "$pepper" == "" ]]; then
|
|||
diceware passphrase generator...'
|
||||
# INSTALL diceware files ## TODO REPLACE WITH ipfs links
|
||||
|
||||
[[ ! -f ~/.zen/astroport/zen/tools/diceware.sh ]] \
|
||||
&& mkdir -p ~/.zen/astroport/zen/tools/ \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/diceware.sh -o ~/.zen/astroport/zen/tools/diceware.sh \
|
||||
&& chmod +x ~/.zen/astroport/zen/tools/diceware.sh
|
||||
[[ ! -f ~/.zen/astrXbian/zen/tools/diceware.sh ]] \
|
||||
&& mkdir -p ~/.zen/astrXbian/zen/tools/ \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/diceware.sh -o ~/.zen/astrXbian/zen/tools/diceware.sh \
|
||||
&& chmod +x ~/.zen/astrXbian/zen/tools/diceware.sh
|
||||
|
||||
[[ ! -f ~/.zen/astroport/zen/tools/diceware-wordlist.txt ]] \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/diceware-wordlist.txt -o ~/.zen/astroport/zen/tools/diceware-wordlist.txt
|
||||
[[ ! -f ~/.zen/astrXbian/zen/tools/diceware-wordlist.txt ]] \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/diceware-wordlist.txt -o ~/.zen/astrXbian/zen/tools/diceware-wordlist.txt
|
||||
|
||||
# LOGIN (=SALT)
|
||||
salt="miz $(~/.zen/astroport/zen/tools/diceware.sh 2 | xargs)"
|
||||
salt="miz $(~/.zen/astrXbian/zen/tools/diceware.sh 2 | xargs)"
|
||||
# PASS (=PEPPER)
|
||||
pepper="$(~/.zen/astroport/zen/tools/diceware.sh 2 | xargs)"
|
||||
pepper="$(~/.zen/astrXbian/zen/tools/diceware.sh 2 | xargs)"
|
||||
fi
|
||||
echo "........."
|
||||
|
||||
# CREATE /tmp/secret.dunikey
|
||||
[[ ! -f ~/.zen/astroport/zen/tools/key_create_dunikey.py ]] \
|
||||
&& mkdir -p ~/.zen/astroport/zen/tools/ \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/key_create_dunikey.py -o ~/.zen/astroport/zen/tools/key_create_dunikey.py \
|
||||
&& chmod +x ~/.zen/astroport/zen/tools/key_create_dunikey.py
|
||||
[[ ! -f ~/.zen/astrXbian/zen/tools/key_create_dunikey.py ]] \
|
||||
&& mkdir -p ~/.zen/astrXbian/zen/tools/ \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/key_create_dunikey.py -o ~/.zen/astrXbian/zen/tools/key_create_dunikey.py \
|
||||
&& chmod +x ~/.zen/astrXbian/zen/tools/key_create_dunikey.py
|
||||
|
||||
python3 ~/.zen/astroport/zen/tools/key_create_dunikey.py "$salt" "$pepper"
|
||||
python3 ~/.zen/astrXbian/zen/tools/key_create_dunikey.py "$salt" "$pepper"
|
||||
sleep 1
|
||||
[[ ! -f /tmp/secret.dunikey ]] && echo "AARRRRGGG problem happens making your secret.dunikey exiting" && exit 1
|
||||
[[ -f /tmp/secret.dunikey ]] && cp -f /tmp/secret.dunikey ~/.zen/
|
||||
|
@ -84,16 +84,16 @@ chmod 400 ~/.zen/secret*
|
|||
echo "~/.zen/secret(s) are OK !"
|
||||
|
||||
# MODIFY ~/.ipfs/config
|
||||
[[ ! -f ~/.zen/astroport/zen/tools/crypto_pb2.py ]] \
|
||||
&& mkdir -p ~/.zen/astroport/zen/tools/ \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/crypto_pb2.py -o ~/.zen/astroport/zen/tools/crypto_pb2.py \
|
||||
[[ ! -f ~/.zen/astrXbian/zen/tools/crypto_pb2.py ]] \
|
||||
&& mkdir -p ~/.zen/astrXbian/zen/tools/ \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/crypto_pb2.py -o ~/.zen/astrXbian/zen/tools/crypto_pb2.py \
|
||||
|
||||
[[ ! -f ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py ]] \
|
||||
&& mkdir -p ~/.zen/astroport/zen/tools/ \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py -o ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py \
|
||||
&& chmod +x ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py
|
||||
[[ ! -f ~/.zen/astrXbian/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py ]] \
|
||||
&& mkdir -p ~/.zen/astrXbian/zen/tools/ \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py -o ~/.zen/astrXbian/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py \
|
||||
&& chmod +x ~/.zen/astrXbian/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py
|
||||
|
||||
ipfs_ID=$(python3 ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py)
|
||||
ipfs_ID=$(python3 ~/.zen/astrXbian/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py)
|
||||
echo $ipfs_ID > ~/.zen/secret.ipfs
|
||||
source ~/.zen/secret.ipfs
|
||||
cat ~/.zen/secret.ipfs
|
||||
|
@ -110,6 +110,6 @@ echo "jq -r --arg PeerID \"\$PeerID\" '.Identity.PeerID=\$PeerID' ~/.ipfs/config
|
|||
echo "jq -r --arg PrivKEY \"\$PrivKEY\" '.Identity.PrivKey=\$PrivKEY' /tmp/config.tmp > ~/.ipfs/config"
|
||||
echo ""
|
||||
|
||||
[[ -f /tmp/init_IPFS_with_cesium_loginKEY.sh ]] && cp -f /tmp/init_IPFS_with_cesium_loginKEY.sh ~/.zen/astroport/zen/tools/
|
||||
[[ -f /tmp/init_IPFS_with_cesium_loginKEY.sh ]] && cp -f /tmp/init_IPFS_with_cesium_loginKEY.sh ~/.zen/astrXbian/zen/tools/
|
||||
rm -f /tmp/secret.dunikey
|
||||
}
|
||||
|
|
|
@ -1,400 +0,0 @@
|
|||
#!/bin/bash
|
||||
{
|
||||
########################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
|
||||
#### ARM / X64 NOT USED THERE
|
||||
MACHINE_TYPE=`uname -m`
|
||||
[ ${MACHINE_TYPE:0:3} == 'arm' ] && isARM="YES"
|
||||
|
||||
if [[ "$1" == "RAZ" ]]; then
|
||||
echo "~/.SSB_ORIGIN is made for $(whoami)"
|
||||
[[ -d ~/.ssb_$(whoami) ]] && mv ~/.ssb_$(whoami) ~/.SSB_ORIGIN
|
||||
rm -Rf ~/.ssb*
|
||||
else
|
||||
echo '
|
||||
########################################################################
|
||||
# \\///
|
||||
# qo-op
|
||||
############# '$MY_PATH/$ME'
|
||||
########################################################################
|
||||
# Make Astroport Station Account
|
||||
#
|
||||
# You should already be runing ipfs daemon
|
||||
|
||||
########################################################################
|
||||
# - Install silkaj youtube-dl & sbotc
|
||||
# - Backup any ~/.ssb to ~/.ssb_$USER
|
||||
# - Creates ~/.ssb_astroport and link it to ~/.ssb
|
||||
# - Ask for credentials (or auto)
|
||||
# - CREATE "~/.ssb/secret" & "~/.ssb/secret.dunikey" of you
|
||||
# !!! KEEP CREDENTIALS IN ~/.zen/secret.astroport.key
|
||||
########################################################################
|
||||
# UnInstall and Recover your ~/.ssb_$USER
|
||||
# cd && rm -Rf ~/.zen && rm ~/.ssb && mv ~/.ssb_$USER ~/.ssb
|
||||
########################################################################
|
||||
I encourage you to read any code you download.
|
||||
This one is not perfect, but will not harm your system...
|
||||
|
||||
Install IPFS (compatible with ARM and X64)
|
||||
curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/.install/ipfs_alone.sh | bash
|
||||
|
||||
HIT ENTER TO CONTINUE
|
||||
'
|
||||
read letsgo
|
||||
fi
|
||||
# "ipfs daemon" MUST be RUNNING
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
||||
[[ "$YOU" == "" ]] && echo "EXIT! PLEASE INSTALL & RUN ipfs daemon WITH curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/.install/ipfs_alone.sh | bash " && exit 1
|
||||
|
||||
# ~/.zen is ASTROPORT living place.
|
||||
[[ ! -d ~/.zen/astroport ]] && mkdir -p ~/.zen/astroport
|
||||
|
||||
# IS git THERE ?
|
||||
[[ ! $(which git) ]] && sudo apt install git -y
|
||||
[[ ! $(which figlet) ]] && sudo apt install figlet -y
|
||||
[[ ! $(which lolcat) ]] && sudo apt install lolcat -y
|
||||
|
||||
# USE git pull OR git clone
|
||||
if [[ -f ~/.zen/astroport/install.sh ]]; then
|
||||
cd ~/.zen/astroport && git pull
|
||||
else
|
||||
cd ~/.zen
|
||||
git clone https://git.p2p.legal/axiom-team/astroport.git
|
||||
fi
|
||||
|
||||
cd ~/.zen/astroport
|
||||
# LETS GO
|
||||
# Install nvm
|
||||
echo '
|
||||
__ _
|
||||
____ ____ ____/ /__ (_)____
|
||||
/ __ \/ __ \/ __ / _ \ / / ___/
|
||||
/ / / / /_/ / /_/ / __/ / (__ )
|
||||
/_/ /_/\____/\__,_/\___/ __/ /____/
|
||||
/___/
|
||||
|
||||
' | lolcat
|
||||
if [[ ! $(which node) ]]; then
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
|
||||
source ~/.bashrc
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
source ~/.bashrc
|
||||
nvm install 12
|
||||
nvm use 12
|
||||
fi
|
||||
|
||||
echo '
|
||||
____ ___ _____ _________
|
||||
/ __ \/ | / ___// _/ ___/
|
||||
/ / / / /| | \__ \ / / \__ \
|
||||
/ /_/ / ___ |___/ // / ___/ /
|
||||
\____/_/ |_/____/___//____/
|
||||
|
||||
' | lolcat
|
||||
|
||||
nodename=$(curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/nodename | bash)
|
||||
|
||||
if [[ ! $(which oasis) ]]; then
|
||||
echo "INSTALL.... http://$nodename"
|
||||
# echo "ENTER Station accessible Network name !!! Suggestion : $nodename"
|
||||
# read nodename
|
||||
# Install nvm
|
||||
if [[ ! $(which node) || ! $(which npm) ]]; then
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
|
||||
source ~/.bashrc
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
nvm install --lts
|
||||
fi
|
||||
npm -g install sodium-native ssb-backlinks ssb-ws ssb-links ssb-query ssb-secret-blob ssb-private
|
||||
npm -g install fraction/oasis#semver:
|
||||
npm -g install ssb-server ## ADD SSB-SERVER FOR PRIVATE SSB MESSAGING (TODO: integrate Feedless modules on LOVELand Portal)
|
||||
else
|
||||
echo "Stopping OASIS"
|
||||
ssbD=$(ps auxf --sort=+utime | grep -w oasis | grep -v -E 'color=auto|grep' | awk '{print $2}')
|
||||
ssbD+=$(ps auxf --sort=+utime | grep -w ssb-server | grep -v -E 'color=auto|grep' | awk '{print $2}')
|
||||
|
||||
for tokill in $ssbD; do
|
||||
kill -9 $tokill
|
||||
done
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# INSTALL Silkaj, CLI for Duniter
|
||||
echo '**************************************************************
|
||||
__ ___
|
||||
(_ | | |/ /\ |
|
||||
__) _|_ |_ |\ /--\ \_|
|
||||
|
||||
#Duniter communication client...
|
||||
' | lolcat
|
||||
|
||||
sudo apt update || true
|
||||
sudo apt install ssmtp mpack libffi-dev build-essential qrencode jq bc gawk -y
|
||||
|
||||
export PATH=$PATH:~/.local/bin
|
||||
if [[ ! $(which silkaj) ]]; then
|
||||
libzzz=$(sudo apt-cache search libsodium | awk '{print $1}' | grep libsodium2)
|
||||
[[ $libzzz == "" ]] && libzzz=$(sudo apt-cache search libsodium | awk '{print $1}' | grep libsodium1)
|
||||
sudo apt install $libzzz -y
|
||||
sudo apt install python3-pip python3-setuptools python3-wheel -y
|
||||
pip3 install base58
|
||||
pip3 install silkaj --user
|
||||
echo 'PATH=$PATH:$HOME/.local/bin' >> ~/.bashrc && source ~/.bashrc
|
||||
fi
|
||||
|
||||
# INSTALL sbotc
|
||||
echo '
|
||||
__ __
|
||||
_____/ /_ ____ / /______
|
||||
/ ___/ __ \/ __ \/ __/ ___/
|
||||
(__ ) /_/ / /_/ / /_/ /__
|
||||
/____/_.___/\____/\__/\___/
|
||||
|
||||
ScuttleButt communication client...
|
||||
' | lolcat
|
||||
if [[ ! $(which sbotc) ]]; then
|
||||
sudo apt install libsodium-dev build-essential imagemagick -y
|
||||
cd /tmp/
|
||||
git clone https://git.scuttlebot.io/%25133ulDgs%2FoC1DXjoK04vDFy6DgVBB%2FZok15YJmuhD5Q%3D.sha256 sbotc
|
||||
cd sbotc
|
||||
make
|
||||
sudo make install
|
||||
cd ~/.zen/astroport
|
||||
fi
|
||||
|
||||
|
||||
echo '
|
||||
__ __
|
||||
____ ______/ /__________ ____ ____ _____/ /_
|
||||
/ __ `/ ___/ __/ ___/ __ \/ __ \/ __ \/ ___/ __/
|
||||
/ /_/ (__ ) /_/ / / /_/ / /_/ / /_/ / / / /_
|
||||
\__,_/____/\__/_/ \____/ .___/\____/_/ \__/
|
||||
/_/
|
||||
|
||||
ONBOARDING activation... linking ~/.ssb to ~/.ssb_astroport
|
||||
|
||||
' | lolcat
|
||||
# CREATE ~/.ssb_astroport
|
||||
[[ ! -d ~/.ssb_astroport ]] && mkdir -p ~/.ssb_astroport
|
||||
|
||||
# If exists backup ~/.ssb to ~/.ssb_$USER SSB (one time only !)
|
||||
[[ -d ~/.ssb_$USER ]] && echo "BACKUP already existing... Restore it : rm -Rf ~/.ssb && mv ~/.ssb_$USER ~/.ssb # and Try again..." && exit 1
|
||||
|
||||
if [[ -d ~/.ssb ]]; then
|
||||
[[ -f ~/.ssb/manifest.json ]] && cp -f ~/.ssb/manifest.json ~/.ssb_astroport/
|
||||
[[ -f ~/.ssb/conn.json ]] && cp -f ~/.ssb/conn.json ~/.ssb_astroport/
|
||||
[[ -f ~/.ssb/gossip.json ]] && cp -f ~/.ssb/gossip.json ~/.ssb_astroport/
|
||||
fi
|
||||
|
||||
# BACKUP ACTUAL SSB ACCOUNT
|
||||
[[ -d ~/.ssb ]] && mv ~/.ssb ~/.ssb_$USER
|
||||
|
||||
# Symlink ~/.ssb -> ~/.ssb_astroport
|
||||
[[ -L ~/.ssb ]] && rm ~/.ssb
|
||||
[[ -d ~/.ssb_astroport ]] && ln -s ~/.ssb_astroport ~/.ssb
|
||||
|
||||
cd ~/.ssb/
|
||||
|
||||
[[ ! -f ~/.ssb/manifest.json ]] && cp ~/.zen/astroport/.install/templates/ssb/manifest.json ~/.ssb/ && echo "manifest.json OK"
|
||||
|
||||
echo '>>>>>>> METAVERSE KEY CREATION <<<<<<<<
|
||||
|
||||
__ __ ____
|
||||
__/ // /_______ ______ __________ ___ / __ \
|
||||
/_ _ __/ ___/ | /| / / __ `/ ___/ __ `__ \/ / / /
|
||||
/_ _ __(__ )| |/ |/ / /_/ / / / / / / / / /_/ /
|
||||
/_//_/ /____/ |__/|__/\__,_/_/ /_/ /_/ /_/\____/
|
||||
|
||||
KEY
|
||||
|
||||
CHOOSE YOU LOGIN (min 8 car. best is more than 6 words!!)...
|
||||
or LEAVE BLANK and HIT ENTER FOR diceware AUTO GENERATION
|
||||
' | lolcat
|
||||
read salt
|
||||
[[ $salt != "" ]] && echo "CHOOSE PASSWORD?" && read pepper && [[ $pepper == "" ]] && exit 1
|
||||
|
||||
if [[ "$salt" == "" && "$pepper" == "" ]]; then
|
||||
|
||||
echo '
|
||||
._ _ ._ _ ._ _ _ ._ o _
|
||||
| | | | | (/_ | | | (_) | | | (_
|
||||
|
||||
diceware passphrase generator...' | lolcat
|
||||
# INSTALL diceware files ## TODO REPLACE WITH ipfs links
|
||||
|
||||
[[ ! -f ~/.zen/astroport/zen/tools/diceware.sh ]] \
|
||||
&& mkdir -p ~/.zen/astroport/zen/tools/ \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/diceware.sh -o ~/.zen/astroport/zen/tools/diceware.sh \
|
||||
&& chmod +x ~/.zen/astroport/zen/tools/diceware.sh
|
||||
|
||||
[[ ! -f ~/.zen/astroport/zen/tools/diceware-wordlist.txt ]] \
|
||||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/diceware-wordlist.txt -o ~/.zen/astroport/zen/tools/diceware-wordlist.txt
|
||||
|
||||
# LOGIN (=SALT)
|
||||
salt="$(~/.zen/astroport/zen/tools/diceware.sh 6 | xargs)"
|
||||
# PASS (=PEPPER)
|
||||
pepper="$(~/.zen/astroport/zen/tools/diceware.sh 4 | xargs)"
|
||||
|
||||
fi
|
||||
echo "........."
|
||||
|
||||
rm -f ~/.zen/secret.astroport.key
|
||||
echo "#20200606 ASTROPORT METAVERSE #SWARM0 IDENTITY
|
||||
ZENID=\"$salt\"
|
||||
ZENPWD=\"$pepper\"" > ~/.zen/secret.astroport.key
|
||||
sleep 1
|
||||
|
||||
# CREATE ~/.ssb/secret.dunikey
|
||||
python3 ~/.zen/astroport/zen/tools/key_create_dunikey.py "$salt" "$pepper"
|
||||
sleep 1
|
||||
[[ ! -f /tmp/secret.dunikey ]] && echo "AARRRRGGG problem happens making your secret.dunikey" && exit 1
|
||||
[[ -f /tmp/secret.dunikey ]] && rm -f ~/.ssb/secret.dunikey && mv /tmp/secret.dunikey ~/.ssb/secret.dunikey
|
||||
|
||||
# CREATE SSB secret
|
||||
g1pub=$(cat ~/.ssb/secret.dunikey | grep "pub" | cut -d ' ' -f 2)
|
||||
echo "G1PUB=\"$g1pub\"" >> ~/.zen/secret.astroport.key
|
||||
|
||||
g1priv=$(cat ~/.ssb/secret.dunikey | grep "sec" | cut -d ' ' -f 2)
|
||||
ssbpub=$(echo $g1pub | base58 -d | base64)
|
||||
ssbpriv=$(echo $g1priv | base58 -d | base64 | tr -d "\n" )
|
||||
|
||||
rm -f ~/.ssb/secret
|
||||
cat > ~/.ssb/secret <<EOF
|
||||
# THIS KEY IS YOURS! REMIND IT AND KEEP IT SAFE AS A REAL WALLET
|
||||
{
|
||||
"curve": "ed25519",
|
||||
"public": "${ssbpub}.ed25519",
|
||||
"private": "${ssbpriv}.ed25519",
|
||||
"id": "@${ssbpub}.ed25519"
|
||||
}
|
||||
|
||||
# WARNING! It's vital that you DO NOT edit OR share your secret name
|
||||
# ONLY Share your public name : @${ssbpub}.ed25519
|
||||
# AND Public G1 WALLET : $g1pub
|
||||
|
||||
EOF
|
||||
|
||||
echo "WHOAMI=\"@$ssbpub.ed25519\"" >> ~/.zen/secret.astroport.key
|
||||
|
||||
echo "
|
||||
_
|
||||
|__|_ \ / _ o | _.
|
||||
|_ |_ \/ (_) | | (_|
|
||||
|
||||
Your Identity is created !!
|
||||
REMEMBER TO KEEP your secret files SECRET !!!
|
||||
|
||||
Your public name : @${ssbpub}.ed25519
|
||||
Your G1 WALLET : $g1pub
|
||||
|
||||
"
|
||||
|
||||
chmod 400 ~/.ssb/secret
|
||||
chmod 400 ~/.ssb/secret.dunikey
|
||||
|
||||
echo '
|
||||
__
|
||||
__________/ /_
|
||||
/ ___/ ___/ __ \
|
||||
(__ |__ ) /_/ /
|
||||
/____/____/_.___/
|
||||
|
||||
NEW IDENTITY ACTIVATED in ~/.ssb/secret
|
||||
|
||||
' | lolcat
|
||||
|
||||
echo '
|
||||
_________
|
||||
/ ____< /
|
||||
/ / __ / /
|
||||
/ /_/ // /
|
||||
\____//_/
|
||||
|
||||
IDENTITY CREATED in ~/.ssb/secret.dunikey
|
||||
|
||||
Install https://cesium.app to use it !!
|
||||
|
||||
' | lolcat
|
||||
|
||||
cat ~/.zen/secret.astroport.key
|
||||
|
||||
echo '
|
||||
|
||||
Now you are going to join #Swarm0 IPFS Metaverse
|
||||
ACTIVATE METAVERSE #SWARM0 INIT SEQUENCE...
|
||||
ALPHA - ALPHA - ALPHA - ALPHA
|
||||
|
||||
'
|
||||
echo "Starting SSB SERVER... wait 10 seconds..."
|
||||
ssb-server start &
|
||||
|
||||
sleep 10
|
||||
|
||||
if [[ $isARM ]]; then
|
||||
echo "Starting OASIS..."
|
||||
oasis --allow-host $nodename --host $nodename &
|
||||
sleep 7
|
||||
else
|
||||
# Intall Patchwork
|
||||
if [[ ! $(which ssb-patchwork) ]]; then
|
||||
wget https://github.com/ssbc/patchwork/releases/download/v3.18.0/ssb-patchwork_3.18.0_amd64.deb -O /tmp/patchwork.deb
|
||||
sudo dpkg -i /tmp/patchwork.deb
|
||||
sleep 1
|
||||
rm /tmp/patchwork.deb
|
||||
|
||||
## npm install way
|
||||
##npm install --global ssb-patchwork
|
||||
sleep 2
|
||||
|
||||
# Start Patchwork
|
||||
#[[ $(which ssb-patchwork) ]] && ssb-patchwork || echo -e "${c_red}Patchwork is not installed$c_"
|
||||
fi
|
||||
fi
|
||||
|
||||
~/.zen/astroport/zen/ssb_INIT.sh
|
||||
~/.zen/astroport/zen/cron_VRFY.sh
|
||||
|
||||
echo -e "Finished...
|
||||
|
||||
########################################################################
|
||||
${c_light}IF SOMETHING WENT WRONG REPORT AN ISSUE
|
||||
https://git.p2p.legal/axiom-team/astroport/issues$c_
|
||||
########################################################################
|
||||
MAKE SOME TEST
|
||||
|
||||
1. Test IPFS Layer
|
||||
ipfs id
|
||||
|
||||
2. Test SSB Layer
|
||||
sbotc whoami
|
||||
|
||||
3. Test G1 Layer
|
||||
silkaj balance $g1pub
|
||||
|
||||
4. Test #Swarm0 Activation
|
||||
crontab -l
|
||||
|
||||
5. Test OASIS
|
||||
WARNING: If tour installation is working on Pathwork, Oasis is disabled
|
||||
http://$nodename:3000
|
||||
|
||||
IF EVERYTHING IS OK
|
||||
ADD oasis TO YOUR system AUTOSTART !!!
|
||||
oasis --allow-host $nodename --host $nodename
|
||||
|
||||
THANK YOU. Now it is time to connect to your friends...
|
||||
|
||||
6. ADD ScuttleButt PUB Invitation (With Oasis: http://$nodename:3000/settings)
|
||||
${c_light}oasis.astroport.com:8008:@UeiA9iqZ0/XTjmYBht230KGr44bsr+Tl5BXSUDFv8vo=.ed25519~xfUSq/J2zLeFwrvvHie4iXI/GAzybUu7Zs9T7/PgZ+w= $c_
|
||||
|
||||
"
|
||||
exit 0
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Author @f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519
|
||||
|
||||
invite="${1?invite}"
|
||||
code="${invite##*~}"
|
||||
addr="${invite%%~*}"
|
||||
feed="${addr##*:}"
|
||||
hostname="${addr%:*}"
|
||||
host="${hostname%:*}"
|
||||
port="${hostname##*:}"
|
||||
|
||||
out="$(sbotc -s "$host" -p "$port" -k "$feed" -K "$code" -t async invite.use {} 2>&1)"
|
||||
if echo "$out" | grep -q 'feed to follow is missing'
|
||||
then
|
||||
echo success
|
||||
elif echo "$out" | grep -q 'method:invite,use is not in list of allowed methods'
|
||||
then
|
||||
echo invalid/expired
|
||||
exit 1
|
||||
else
|
||||
echo fail
|
||||
echo "$out"
|
||||
echo trying another method:
|
||||
sbotc -s "$host" -p "$port" -k "$feed" -K "$code" -t source blobs.get ''
|
||||
exit 1
|
||||
fi
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/bash
|
||||
#recps='@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519 @5XaVcAJ5DklwuuIkjGz4lwm2rOnMHHovhNg7BFFnyJ8=.ed25519'
|
||||
recps=$1
|
||||
file=$2
|
||||
|
||||
name=${file##*/}
|
||||
link="$(sblob encrypt "$file")"
|
||||
type="$(file -b --mime-type "$file")"
|
||||
id=${link%?unbox=*}
|
||||
key=${link#*?unbox=}
|
||||
size="$(sbotc -e blobs.size "$id")"
|
||||
recps_array="[$(for recp in $recps; do printf '"%s"\n' "$recp"; done | paste -sd,)]"
|
||||
sbotc private.publish '{"type":"post","text":"['"$name"']('"$link"')","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'","query":{"unbox":"'"$key"'"}}],"recps":'"$recps_array"'}' "$recps_array"
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
# Author: Fred (support@qo-op.com)
|
||||
# Version: 1.0
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
########################################################################
|
||||
# This script creates ~/.ssb/secret.dunikey from SSB secret
|
||||
########################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
########################################################################
|
||||
# \\///
|
||||
# qo-op
|
||||
#############
|
||||
[[ ! -f ~/.ssb/secret ]] && echo "ERROR Your SSB secret is missing... EXIT" && exit 1
|
||||
rm -f ~/.ssb/secret.dunikey
|
||||
ssbpub=$(cat ~/.ssb/secret | grep public\" | cut -d ' ' -f 4 | cut -d '.' -f 1 | sed s/\"//g)
|
||||
ssbpriv=$(cat ~/.ssb/secret | grep private\" | cut -d ' ' -f 4 | cut -d '.' -f 1 | sed s/\"//g)
|
||||
g1pub=$(echo $ssbpub | base64 -d | base58)
|
||||
g1priv=$(echo $ssbpriv | base64 -d | base58)
|
||||
cat > ~/.ssb/secret.dunikey <<EOF
|
||||
Type: PubSec
|
||||
Version: 1
|
||||
pub: $g1pub
|
||||
sec: $g1priv
|
||||
EOF
|
||||
echo "$g1pub"
|
|
@ -1,41 +0,0 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
# Author: Fred (support@qo-op.com)
|
||||
# Version: 2020.03.21
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
########################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
echo '
|
||||
########################################################################
|
||||
# \\///
|
||||
# qo-op
|
||||
############# '$MY_PATH/$ME'
|
||||
########################################################################
|
||||
__ __ _
|
||||
(_ (_ |_) __ o _| _ ._ _|_ o _|_
|
||||
__) __) |_) | (_| (/_ | | |_ | |_ \/
|
||||
/ SWITCHing
|
||||
########################################################################
|
||||
'
|
||||
# Taking care of 1st backup and linking
|
||||
[ ! -L ~/.ssb ] && [ ! -d ~/.ssb_1st ] && echo "Making 1st backup" && mv ~/.ssb ~/.ssb_1st && ln -s ~/.ssb_1st ~/.ssb
|
||||
|
||||
# Choose Loop
|
||||
for dir in $(ls -d ~/.ssb* | cut -d '_' -f 2); do
|
||||
[ ! -e $dir ] && echo '
|
||||
__
|
||||
(_ _ _|_ _|_ | _ |_ _|_ _|_
|
||||
__) (_ |_| |_ |_ | (/_ |_) |_| |_ |_ ID
|
||||
|
||||
' || continue
|
||||
|
||||
echo "Do you want to become $dir Identity ? (y)/n" && read isok
|
||||
[[ "$isok" == "y" ]] && [ -L ~/.ssb ] && rm ~/.ssb && ln -s ~/.ssb_$dir ~/.ssb && echo "Welcome $dir" && break
|
||||
done
|
||||
|
||||
echo 'Your SSB Identity is now linked to'
|
||||
ls -l ~/.ssb
|
||||
[ ! -f ~/.ssb/secret.dunikey ] && [ -f $MY_PATH/secret2dunikey.sh ] && $MY_PATH/secret2dunikey.sh
|
||||
[ -f ~/.ssb/secret.dunikey ] && g1pub=$(cat ~/.ssb/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && echo "G1SSB Wallet pubkey : $g1pub"
|
|
@ -52,7 +52,7 @@ ipfs cat /ipns/$NODEIPNS/xbian/F${XZUID}
|
|||
|
||||
echo "SYNCing SWARM..."
|
||||
echo "-----------------------------------------------------------------"
|
||||
~/.zen/astroport/zen/ipfs_SWARM_refresh.sh
|
||||
~/.zen/astrXbian/zen/ipfs_SWARM_refresh.sh
|
||||
|
||||
echo "PREPARE my local FASTRXBIAN (films) list from ipfs_swarm"
|
||||
echo "-----------------------------------------------------------------"
|
||||
|
|
Loading…
Reference in New Issue