Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nucleo
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blockchain
nucleo
Commits
04143abb
Commit
04143abb
authored
5 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
archivos de pid tambien funciona para los start-*.pid
parent
9cd333b9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/start.sh
+89
-81
89 additions, 81 deletions
bin/start.sh
with
89 additions
and
81 deletions
bin/start.sh
+
89
−
81
View file @
04143abb
...
...
@@ -34,21 +34,23 @@ function startbootnode
echo
"A bootnode is already running."
false
)
||
exit
echo
${
BASHPID
}
>
${
BFANETWORKDIR
}
/start-bootnode-loop.pid
if
[
-t
1
]
then
echo
Starting bootnode.
fi
while
:
do
echo
echo
'***'
echo
bootnode
--nodekey
$keyfile
&
echo
$!
>
$pidfile
wait
sleep
60
done
2>&1 |
${
BFAHOME
}
/bin/log.sh
${
BFANETWORKDIR
}
/bootnode/log &
(
echo
${
BASHPID
}
>
${
BFANETWORKDIR
}
/start-bootnode-loop.pid
while
:
do
echo
echo
'***'
echo
bootnode
--nodekey
$keyfile
&
echo
$!
>
$pidfile
wait
sleep
60
done
)
2>&1 |
${
BFAHOME
}
/bin/log.sh
${
BFANETWORKDIR
}
/bootnode/log &
)
9>>
$pidfile
}
...
...
@@ -66,8 +68,8 @@ function startmonitor
echo
"A monitor is already running."
false
)
||
exit
echo
${
BASHPID
}
>
${
BFANETWORKDIR
}
/start-monitor-loop.pid
(
echo
${
BASHPID
}
>
${
BFANETWORKDIR
}
/start-monitor-loop.pid
while
:
do
monitor.js &
...
...
@@ -119,6 +121,53 @@ function geth_capab
fi
}
function
geth_args
{
# (re)configure parameters (you never know if they changed)
flexargs
=
"
$(
getsyncmode
)
"
geth_capab
xtra
=
$(
extradata
)
if
[
-n
"
$xtra
"
]
then
flexargs
=
"
${
flexargs
}
--extradata
$(
extradata
)
"
fi
unset
xtra
#
if
[
"
$netport
"
!=
30303
]
then
flexargs
=
"
${
flexargs
}
--port
$netport
"
fi
if
[
"
$rpcport
"
!=
30303
]
then
flexargs
=
"
${
flexargs
}
--rpcport
$rpcport
"
fi
if
[
-n
"
$BFAVERBOSITY
"
-a
"
$BFAVERBOSITY
"
!=
3
]
then
flexargs
=
"
${
flexargs
}
--verbosity
${
BFAVERBOSITY
:-
3
}
"
fi
# the basic modules
rpcapis
=
"eth,net,web3,clique"
if
[
-e
"
${
BFANODEDIR
}
/opentx"
]
then
# If you want other hostnames, put them in this file (comma separated)
read
txhostnames dummy <
${
BFANODEDIR
}
/opentx
if
[
"
${
txhostnames
}
"
=
""
]
then
# but if you don't put any hostnames, these are the defaults
txhostnames
=
"localhost,opentx.bfa.ar"
fi
flexargs
=
"
${
flexargs
}
--rpcvhosts
${
txhostnames
}
"
# INADDR_ANY - listen on all addresses
flexargs
=
"
${
flexargs
}
--rpcaddr 0.0.0.0"
# Oh, and don't put your keys in / because we use that as a dummy directory
flexargs
=
"
${
flexargs
}
--keystore /"
else
# expose more modules, if we are a private node (localhost'ed)
rpcapis
=
"
${
rpcapis
}
,admin,miner,personal"
fi
flexargs
=
"
${
flexargs
}
--rpcapi
${
rpcapis
}
"
}
function
startgeth
{
# Start the node.
...
...
@@ -131,7 +180,6 @@ function startgeth
echo
"A geth is already running."
false
)
||
exit
1
echo
${
BASHPID
}
>
${
BFANETWORKDIR
}
/start-geth-loop.pid
if
[
-t
1
]
then
echo
Starting geth
...
...
@@ -139,74 +187,34 @@ function startgeth
echo
Consider running: bfalog.sh
fi
loop_counter
=
0
while
:
do
loop_counter
=
$((
${
loop_counter
}
+
1
))
ERRTEXT
=
"geth"
echo
echo
'***'
echo
"*** loop #
${
loop_counter
}
"
echo
'***'
echo
# (re)configure parameters (you never know if they changed)
flexargs
=
"
$(
getsyncmode
)
"
geth_capab
#
xtra
=
$(
extradata
)
if
[
-n
"
$xtra
"
]
then
flexargs
=
"
${
flexargs
}
--extradata
$(
extradata
)
"
fi
unset
xtra
#
if
[
"
$netport
"
!=
30303
]
then
flexargs
=
"
${
flexargs
}
--port
$netport
"
fi
if
[
"
$rpcport
"
!=
30303
]
then
flexargs
=
"
${
flexargs
}
--rpcport
$rpcport
"
fi
if
[
-n
"
$BFAVERBOSITY
"
-a
"
$BFAVERBOSITY
"
!=
3
]
then
flexargs
=
"
${
flexargs
}
--verbosity
${
BFAVERBOSITY
:-
3
}
"
fi
# the basic modules
rpcapis
=
"eth,net,web3,clique"
if
[
-e
"
${
BFANODEDIR
}
/opentx"
]
then
# If you want other hostnames, put them in this file (comma separated)
read
txhostnames dummy <
${
BFANODEDIR
}
/opentx
if
[
"
${
txhostnames
}
"
=
""
]
then
# but if you don't put any hostnames, these are the defaults
txhostnames
=
"localhost,opentx.bfa.ar"
fi
flexargs
=
"
${
flexargs
}
--rpcvhosts
${
txhostnames
}
"
# INADDR_ANY - listen on all addresses
flexargs
=
"
${
flexargs
}
--rpcaddr 0.0.0.0"
# Oh, and don't put your keys in / because we use that as a dummy directory
flexargs
=
"
${
flexargs
}
--keystore /"
else
# expose more modules, if we are a private node (localhost'ed)
rpcapis
=
"
${
rpcapis
}
,admin,miner,personal"
fi
flexargs
=
"
${
flexargs
}
--rpcapi
${
rpcapis
}
"
set
-x
geth
\
--datadir
${
BFANODEDIR
}
\
--networkid
${
BFANETWORKID
}
\
--rpc
\
--gcmode
archive
\
${
flexargs
}
\
--rpccorsdomain
\*
\
--bootnodes
"
${
bootnodes
}
"
&
set
+x
echo
$!
>
$pidfile
rv
=
0
wait
-n
||
rv
=
$?
sleep
60
done
2>&1 |
${
BFAHOME
}
/bin/log.sh
${
BFANODEDIR
}
/log &
(
echo
${
BASHPID
}
>
${
BFANETWORKDIR
}
/start-geth-loop.pid
while
:
do
loop_counter
=
$((
${
loop_counter
}
+
1
))
ERRTEXT
=
"geth"
echo
echo
'***'
echo
"*** loop #
${
loop_counter
}
"
echo
'***'
echo
geth_args
set
-x
geth
\
--datadir
${
BFANODEDIR
}
\
--networkid
${
BFANETWORKID
}
\
--rpc
\
--gcmode
archive
\
${
flexargs
}
\
--rpccorsdomain
\*
\
--bootnodes
"
${
bootnodes
}
"
&
set
+x
echo
$!
>
$pidfile
rv
=
0
wait
-n
||
rv
=
$?
sleep
60
done
)
2>&1 |
${
BFAHOME
}
/bin/log.sh
${
BFANODEDIR
}
/log &
)
9>>
$pidfile
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment