timestamp=$(date -u +%s%N | cut -b1-13)
This commit is contained in:
parent
0a8ec2f6e7
commit
204e851c1b
42
ISOconfig.sh
42
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/astrXbian/zen/jaklis
|
||||
cd ~/.zen/astroport/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/astrXbian/zen/tools/diceware.sh 3 | xargs)"
|
||||
salt="$(~/.zen/astroport/zen/tools/diceware.sh 3 | xargs)"
|
||||
[[ $salt == "" ]] && echo "ERROR" && exit 1
|
||||
pepper="$(~/.zen/astrXbian/zen/tools/diceware.sh 3 | xargs)"
|
||||
pepper="$(~/.zen/astroport/zen/tools/diceware.sh 3 | xargs)"
|
||||
|
||||
g1_salt="$salt"
|
||||
g1_pepper="$pepper"
|
||||
|
@ -55,7 +55,7 @@ echo "$g1_pepper" >> /tmp/secret.june
|
|||
########################################################################
|
||||
echo "CREATING /tmp/secret.dunikey"
|
||||
########################################################################
|
||||
python3 ~/.zen/astrXbian/zen/tools/key_create_dunikey.py "$g1_salt" "$g1_pepper"
|
||||
python3 ~/.zen/astroport/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)
|
||||
|
@ -64,7 +64,7 @@ g1sec=$(cat /tmp/secret.dunikey | grep "sec" | cut -d ' ' -f 2)
|
|||
########################################################################
|
||||
echo "CREATING /tmp/config.ipfs"
|
||||
########################################################################
|
||||
ipfs_ID=$(python3 ~/.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)
|
||||
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
|
||||
|
@ -81,16 +81,17 @@ IPFS_sync_directory="$HOME/astroport"
|
|||
########################################################################
|
||||
# INSTALL KEYS
|
||||
########################################################################
|
||||
[[ -f ~/.zen/secret.june ]] && mv ~/.zen/secret.june ~/.zen/secret.june.old
|
||||
timestamp=$(date -u +%s%N | cut -b1-13)
|
||||
[[ -f ~/.zen/secret.june ]] && mv ~/.zen/secret.june ~/.zen/secret.june.$timestamp
|
||||
mv /tmp/secret.june ~/.zen/secret.june
|
||||
|
||||
[[ -f ~/.zen/secret.dunikey ]] && mv ~/.zen/secret.dunikey ~/.zen/secret.dunikey.old
|
||||
[[ -f ~/.zen/secret.dunikey ]] && mv ~/.zen/secret.dunikey ~/.zen/secret.dunikey.$timestamp
|
||||
mv /tmp/secret.dunikey ~/.zen/secret.dunikey
|
||||
|
||||
[[ -f ~/.zen/secret.ipfs ]] && mv ~/.zen/secret.ipfs ~/.zen/secret.ipfs.old
|
||||
[[ -f ~/.zen/secret.ipfs ]] && mv ~/.zen/secret.ipfs ~/.zen/secret.ipfs.$timestamp
|
||||
mv /tmp/secret.ipfs ~/.zen/secret.ipfs
|
||||
|
||||
[[ -f ~/.ipfs/config ]] && mv ~/.ipfs/config ~/.ipfs/config.old
|
||||
[[ -f ~/.ipfs/config ]] && mv ~/.ipfs/config ~/.ipfs/config.$timestamp
|
||||
mv /tmp/config.ipfs ~/.ipfs/config
|
||||
|
||||
|
||||
|
@ -103,7 +104,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:8181/ipns/$IPNSKEY/xbian/$XZUID
|
||||
########################################################################
|
||||
XZUID=$(~/.zen/astrXbian/zen/tools/diceware.sh 1 | xargs)$(hostname -I | cut -d ' ' -f 1 | cut -d "." -f 4 )$(~/.zen/astrXbian/zen/tools/diceware.sh 1 | xargs)
|
||||
XZUID=$(~/.zen/astroport/zen/tools/diceware.sh 1 | xargs)$(hostname -I | cut -d ' ' -f 1 | cut -d "." -f 4 )$(~/.zen/astroport/zen/tools/diceware.sh 1 | xargs)
|
||||
echo "CREATE ~/.zen/ipfs/xbian/$XZUID"
|
||||
mkdir -p ~/.zen/ipfs/xbian
|
||||
touch ~/.zen/ipfs/xbian/$XZUID
|
||||
|
@ -114,9 +115,9 @@ echo "$XZUID" > ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid
|
|||
########################################################################
|
||||
echo "CREATE + profile"
|
||||
########################################################################
|
||||
cd ~/.zen/astrXbian/zen/jaklis
|
||||
./jaklis.py -n "https://g1.data.e-is.pro" set --name "$XZUID" --avatar "$HOME/.zen/astrXbian/logo.png" #CESIUM+
|
||||
./jaklis.py -n "https://data.gchange.fr" set --name "$XZUID" --avatar "$HOME/.zen/astrXbian/logo.png" #GCHANGE+
|
||||
cd ~/.zen/astroport/zen/jaklis
|
||||
./jaklis.py -n "https://g1.data.e-is.pro" set --name "$XZUID" --avatar "$HOME/.zen/astroport/logo.png" #CESIUM+
|
||||
./jaklis.py -n "https://data.gchange.fr" set --name "$XZUID" --avatar "$HOME/.zen/astroport/logo.png" #GCHANGE+
|
||||
|
||||
########################################################################
|
||||
########################################################################
|
||||
|
@ -137,10 +138,10 @@ ipfs swarm peers
|
|||
########################################################################
|
||||
echo 'EXTEND ~/.bashrc'
|
||||
########################################################################
|
||||
~/.zen/astrXbian/.install/update_bashrc.sh
|
||||
~/.zen/astroport/.install/update_bashrc.sh
|
||||
|
||||
echo "Configure .kodi/addons/plugin.video.vstream/resources/sites/astroport.py"
|
||||
cp -f ~/.zen/astrXbian/.install/.kodi/addons/plugin.video.vstream/resources/sites/astroport.py \
|
||||
cp -f ~/.zen/astroport/.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 +152,8 @@ sed -i "s/_PROFIL_/$XZUID/g" ~/.kodi/addons/plugin.video.vstream/resources/sites
|
|||
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/astrXbian/zen/cesium_IPFS_swarm.sh
|
||||
~/.zen/astrXbian/zen/ipfs_SWARM_refresh.sh
|
||||
~/.zen/astroport/zen/cesium_IPFS_swarm.sh
|
||||
~/.zen/astroport/zen/ipfs_SWARM_refresh.sh
|
||||
|
||||
########################################################################
|
||||
echo 'SEND "ipfstryme" message'
|
||||
|
@ -171,9 +172,9 @@ echo 'SEND ipfstryme to oasis' # Add your bootstrap Pub here
|
|||
########################################################################
|
||||
echo 'INSTALL Astroport cron_MINUTE'
|
||||
########################################################################
|
||||
~/.zen/astrXbian/zen/cron_VRFY.sh
|
||||
~/.zen/astroport/zen/cron_VRFY.sh
|
||||
|
||||
# Run only once: comment /etc/rc.local (su - xbian -c "~/.zen/astrXbian/ISOconfig.sh")
|
||||
# Run only once: comment /etc/rc.local (su - xbian -c "~/.zen/astroport/ISOconfig.sh")
|
||||
# sudo sed -i s/su/\#su/g /etc/rc.local
|
||||
# BETTER NOT: Send new 'ipfstryme' message on each boot is done instead
|
||||
|
||||
|
@ -195,7 +196,8 @@ sudo chattr +i /etc/resolv.conf
|
|||
# WRITE ~/.zen/ipfs.sync CONFIG (meaning DONE)
|
||||
echo "IPFS_SYNC_DIR=$IPFS_sync_directory" > ~/.zen/ipfs.sync
|
||||
|
||||
# OTHER LANGUAGE KEYBOARD dpkg-reconfigure keyboard-configuration
|
||||
# RESIZING / partition
|
||||
# sudo btrfs filesystem resize max /
|
||||
|
||||
########################################################################
|
||||
echo 'REBOOT NOW...'
|
||||
|
|
Loading…
Reference in New Issue