node_modules

This commit is contained in:
qo-op 2020-03-24 14:52:34 +01:00
parent cc4e595765
commit 8d8ec64bf6
1 changed files with 20 additions and 7 deletions

View File

@ -25,7 +25,7 @@ scuttlebutt() {
# Move node_modules with ssb-server (why do I have to do that?)
ssbSERVER=$(which ssb-server)
node_modules_path=$(echo $ssbSERVER | sed s/bin\\/ssb-server/lib/)
mv ~/.ssb_astroport/node_modules/* $node_modules_path/
mv ~/.ssb_astroport/node_modules/* $node_modules_path/node_modules/
fi
# TEST ssb-server Install
@ -55,7 +55,10 @@ echo "
_|
$nodename
"
if [[ $extension == $nodename ]]; then
nodename=$nodename.home
# LOCAL
cat > ~/.ssb/config <<EOF
@ -81,8 +84,14 @@ while true; do
echo _! > ~/.zen/ssb.pid
done
EOF
# REPLACE _ with $
sed -i s/_/\$/g ~/.zen/run-ssb_$nodename.sh
chmod 755 ~/.zen/run-ssb_$nodename.sh
ssb-server start &
else
else
# PUB
cat > ~/.ssb/config <<EOF
@ -115,18 +124,22 @@ while true; do
echo _! > ~/.zen/ssb.pid
done
EOF
fi
# REPLACE _ with $
sed -i s/_/\$/g ~/.zen/run-ssb_$nodename.sh
chmod 755 ~/.zen/run-ssb_$nodename.sh
# RUN ssb-server
~/.zen/run-ssb_$nodename.sh &
ssb-server start --host $nodename &
fi
echo "DOES SCUTTELBUTT IS RUNNING?"
echo "ADD $HOME/.zen/run-ssb_$nodename.sh & TO YOUR '/etc/rc.local' !!! "
echo '
__ _ _ _ _
(_ |_|_)\ /|_|_) o._ o_|_
__)|_| \ \/ |_| \ || || |_ ... SCUTTLEBUTT ... OK
__)|_| \ \/ |_| \ || || |_ ... SCUTTLEBUTT ... OK?
'