make sure that the script runs as root

This commit is contained in:
Pratham Patel 2023-11-20 17:53:43 +05:30
parent cfc7064964
commit 697f87eeb5
No known key found for this signature in database

View File

@ -1,6 +1,12 @@
#!/usr/bin/env bash
set -x
if [[ "$(id -u)" -ne 0 ]]; then
>&2 echo "$0: please run this script as root"
exit 1
fi
KICKSTART_BASE="Rocky"
TODAY="$(TZ='UTC' date +%Y.%m.%d)"
KICKSTART_FILE="${KICKSTART_BASE}.ks"