Skip to content

Commit

Permalink
add sudo check
Browse files Browse the repository at this point in the history
  • Loading branch information
boddumanohar authored Jul 31, 2023
1 parent 781e28d commit 97d8788
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions chimney.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -e

if [ "$(id -u)" -ne 0 ]; then
echo "This script requires sudo privileges. Please enter your password:"
exec sudo "$0" "$@" # This re-executes the script with sudo
fi

# setup variables
export CLUSTER=0chaincluster
export DELEGATE_WALLET=0chainclientId
Expand Down Expand Up @@ -29,6 +34,7 @@ export DEBIAN_FRONTEND=noninteractive
export PROJECT_ROOT_SSD=/var/0chain/blobber/ssd
export PROJECT_ROOT_HDD=/var/0chain/blobber/hdd


#TODO: Fix docker installation
sudo apt update -qq
sudo apt install -qqy unzip curl containerd docker.io
Expand Down

0 comments on commit 97d8788

Please sign in to comment.