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
047c308e
Commit
047c308e
authored
5 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
start.sh mas consistente en hacer archivos .pid
parent
4591b793
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/bfaupdate.sh
+7
-1
7 additions, 1 deletion
bin/bfaupdate.sh
bin/start.sh
+14
-7
14 additions, 7 deletions
bin/start.sh
with
21 additions
and
8 deletions
bin/bfaupdate.sh
+
7
−
1
View file @
047c308e
...
...
@@ -55,9 +55,15 @@ then
runasownerof
${
BFAHOME
}
git pull
exec
$0
wealreadypulled
else
aptinstall libclass-accessor-perl
# make sure bfa is in group sudo
id
bfa |
grep
-q
sudo
||
runasownerof / adduser bfa
sudo
aptinstall libclass-accessor-perl
# rebuild installed modules
runasownerof
${
BFAHOME
}
npm rebuild
# install new ones (if any)
runasownerof
${
BFAHOME
}
npm
install
# delete stale pid files
runasownerof
${
BFAHOME
}
find
${
BFAHOME
}
-name
'*.pid'
-delete
set
+x
echo
"*** Now would be a good time to restart the server."
fi
This diff is collapsed.
Click to expand it.
bin/start.sh
+
14
−
7
View file @
047c308e
...
...
@@ -26,7 +26,7 @@ function startbootnode
{
local
ERRTEXT
=
"bootnode section failed"
local
keyfile
=
${
BFANETWORKDIR
}
/bootnode/key
local
pidfile
=
${
BFANETWORKDIR
}
/bootnode
/bootnode
.pid
local
pidfile
=
${
BFANETWORKDIR
}
/bootnode.pid
which bootnode
>
/dev/null 2>&1
||
return
0
test
-r
$keyfile
||
return
0
(
...
...
@@ -34,6 +34,7 @@ function startbootnode
echo
"A bootnode is already running."
false
)
||
exit
echo
${
BASHPID
}
>
${
BFANODEDIR
}
/start-bootnode-loop.pid
if
[
-t
1
]
then
echo
Starting bootnode.
...
...
@@ -65,10 +66,15 @@ function startmonitor
echo
"A monitor is already running."
false
)
||
exit
echo
${
BASHPID
}
>
${
BFANODEDIR
}
/start-monitor-loop.pid
(
monitor.js &
echo
$!
>
$pidfile
wait
while
:
do
monitor.js &
echo
$!
>
$pidfile
wait
sleep
10
done
)
2>&1 |
${
BFAHOME
}
/bin/log.sh
${
BFANODEDIR
}
/log &
)
9>>
$pidfile
}
...
...
@@ -117,6 +123,7 @@ function startgeth
{
# Start the node.
local
ERRTEXT
=
"geth section failed"
local
pidfile
=
${
BFANETWORKDIR
}
/geth.pid
which geth
>
/dev/null 2>&1
||
return
0
#
(
...
...
@@ -124,7 +131,7 @@ function startgeth
echo
"A geth is already running."
false
)
||
exit
1
echo
${
BASHPID
}
>
${
BFANODEDIR
}
/start-loop.pid
echo
${
BASHPID
}
>
${
BFANODEDIR
}
/start-
geth-
loop.pid
if
[
-t
1
]
then
echo
Starting geth
...
...
@@ -195,12 +202,12 @@ function startgeth
--rpccorsdomain
\*
\
--bootnodes
"
${
bootnodes
}
"
&
set
+x
echo
$!
>
$
{
BFANODEDIR
}
/geth.pid
echo
$!
>
$
pidfile
rv
=
0
wait
-n
||
rv
=
$?
sleep
60
done
2>&1 |
${
BFAHOME
}
/bin/log.sh
${
BFANODEDIR
}
/log &
)
9>>
$
{
BFANODEDIR
}
/start-loop.pid
)
9>>
$
pidfile
}
startgeth
...
...
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