Skip to content

Commit

Permalink
Merge pull request #462 from arturgontijo/install_daemon
Browse files Browse the repository at this point in the history
[scripts] Using sudo only if necessary.
  • Loading branch information
anandrgitnirman authored Mar 9, 2020
2 parents 2a4cdde + 3d2b6ed commit a6c2691
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/installdaemon
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ SNETD_VERSION=`curl -s https://api.github.com/repos/singnet/snet-daemon/releases
echo 'version' $SNETD_VERSION
wget https://github.com/singnet/snet-daemon/releases/download/${SNETD_VERSION}/snet-daemon-${SNETD_VERSION}-linux-amd64.tar.gz
tar -xvf snet-daemon-${SNETD_VERSION}-linux-amd64.tar.gz
sudo mv snet-daemon-${SNETD_VERSION}-linux-amd64/snetd /usr/bin/snetd
WITH_SUDO=$([ "$EUID" != 0 ] && echo "sudo" || echo "")
$WITH_SUDO mv snet-daemon-${SNETD_VERSION}-linux-amd64/snetd /usr/bin/snetd

0 comments on commit a6c2691

Please sign in to comment.