Merge pull request #2506 from FedericoTorres233/patch-1
Some checks are pending
CodeQL / Analyze (python) (push) Waiting to run
testing / build (ubuntu-latest, 3.10) (push) Waiting to run
testing / build (ubuntu-latest, 3.11) (push) Waiting to run
testing / build (ubuntu-latest, 3.12) (push) Waiting to run
testing / build (ubuntu-latest, 3.13) (push) Waiting to run
testing / build (ubuntu-latest, 3.8) (push) Waiting to run
testing / build (ubuntu-latest, 3.9) (push) Waiting to run

Check if remote-install.sh is being run as root
This commit is contained in:
Jeremy Grossmann 2025-03-02 16:14:33 +08:00 committed by GitHub
commit 4cb38b23eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,6 +38,13 @@ function log {
}
lsb_release -d | grep "LTS" > /dev/null
if [ "$EUID" -ne 0 ]
then
echo "This script must be run as root"
exit 1
fi
if [ $? != 0 ]
then
echo "This script can only be run on a Linux Ubuntu LTS release"