Skip to content
Snippets Groups Projects
Commit 993153ec authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

Todavia faltaba "require"

parent f839ea5a
No related branches found
No related tags found
No related merge requests found
......@@ -70,11 +70,15 @@ function web3install
info "Initialising nodejs." &&
runasownerof ~bfa npm init -y
# nodejs package(s) that we need.
echo 'require("web3")' | runasownerof ~bfa nodejs 2>/dev/null && return
info "Installing nodejs module: web3 (will show many warnings)"
runasownerof ~bfa npm install web3
info "Installing nodejs module: require"
runasownerof ~bfa npm install require
if echo 'require("web3")' | runasownerof ~bfa nodejs 2>/dev/null
then
true
else
info "Installing nodejs module: web3 (will show many warnings)"
runasownerof ~bfa npm install web3
fi
}
function golanginstall
......@@ -195,10 +199,10 @@ function userconfig
function cronit
{
if [ $( ( crontab -u bfa -l 2>/dev/null || true ) | grep -E "$BFAHOME/bin/cron.sh" | wc -l ) -eq 0 ]
if [ $( ( crontab -u bfa -l 2>/dev/null || true ) | grep -E "${BFAHOME#~/}/bin/cron.sh" | wc -l ) -eq 0 ]
then
info "Install crontab to start automatically upon reboot"
(( crontab -u bfa -l 2>/dev/null || true ) ; echo "@reboot $BFAHOME/bin/cron.sh" ) | crontab -u bfa -
(( crontab -u bfa -l 2>/dev/null || true ) ; echo "@reboot ${BFAHOME#~/}/bin/cron.sh" ) | crontab -u bfa -
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment