Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tom
crown-core
Commits
6e62f127
Commit
6e62f127
authored
7 years ago
by
Extrememist
Committed by
GitHub
7 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #59 from fell0w/UpdateScript
Update script
parents
15ab14da
c8ddccf0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
update.sh
+31
-0
update.sh
with
31 additions
and
0 deletions
+31
-0
update.sh
0 → 100644
View file @
6e62f127
echo
"Updating Tron..."
# install requirement 'jq'
sudo
apt-get
install
jq
crown-cli stop
RELEASE
=
$(
curl
-s
'https://api.github.com/repos/Crowndev/crowncoin/releases/latest'
| jq
-r
'.assets | .[] | select(.name=="crown-x86_64-unknown-linux-gnu.tar.gz") | .browser_download_url'
)
curl
-sSL
$RELEASE
-o
crown.tgz
tar
xzf crown.tgz
--no-anchored
crownd crown-cli
--transform
=
's/.*\///'
# use strip if installed
if
hash
strip 2>/dev/null
;
then
strip crownd crown-cli
fi
sudo mv
crownd crown-cli /usr/local/bin/
rm
-rf
crown
*
crownd
echo
"Update finished"
echo
"Waiting for crownd to start up..."
sleep
15
VERSION
=
$(
crown-cli getinfo | jq
'.version'
)
PROTOCOL_VERSION
=
$(
crown-cli getinfo | jq
'.protocolversion'
)
WALLET_VERSION
=
$(
crown-cli getinfo | jq
'.walletversion'
)
ERRORS
=
$(
crown-cli getinfo | jq
'.errors'
)
if
[
"
$VERSION
"
=
'""'
]
||
[
"
$VERSION
"
=
"null"
]
||
[
"
$PROTOCOL_VERSION
"
=
'""'
]
||
[
"
$PROTOCOL_VERSION
"
=
"null"
]
||
[
"
$WALLET_VERSION
"
=
'""'
]
||
[
"
$WALLET_VERSION
"
=
"null"
]
||
[
"
$ERRORS
"
!=
'""'
]
;
then
echo
"An error has occured. Please run 'crown-cli getinfo' and check if the service is running."
echo
"If you encounter any problems, join us at https://mm.crownlab.eu/crown/channels/tron for support"
else
echo
"crownd is up and running!"
echo
"version:
$VERSION
"
echo
"protocolversion:
$PROTOCOL_VERSION
"
echo
"walletversion:
$WALLET_VERSION
"
fi
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help