Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for sudo in install and update script #2360

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions scripts/installation/openkat-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ echo "Step 0.1 - Removing old install/upgrade files, update system and install c
rm -f kat-*.deb kat-debian1[12]-*.tar.gz xtdb-*.deb

echo "Step 0.2 - Update OS and get needed tools"
if ! command -v sudo; then
if [ "$EUID" -ne 0 ]; then
echo "Sudo could not be found, please first install sudo as root"
exit 1
fi
apt -y update
apt -y install sudo
fi

sudo apt -y update
sudo apt -y install curl

Expand Down
10 changes: 10 additions & 0 deletions scripts/installation/openkat-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ fi
debian_version=$VERSION_ID

echo "Step 0 - Get needed tools and clean up"

if ! command -v sudo; then
if [ "$EUID" -ne 0 ]; then
echo "Sudo could not be found, please first install sudo as root"
exit 1
fi
apt -y update
apt -y install sudo
fi

sudo apt -y update
sudo apt -y install curl

Expand Down