feat: add cloud-config for user setup and update setup script for compatibility checks
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
This commit is contained in:
13
setup.sh
13
setup.sh
@@ -213,12 +213,10 @@ warning_prompt() {
|
||||
log_error "Please ensure you have a backup of your data before proceeding."
|
||||
log_error "This script will modify system files and may require sudo permissions.\n"
|
||||
log_info "This script works best on a fresh Fedora, Ubuntu or Arch Linux installation."
|
||||
log_info "Type 'continue' to continue or Ctrl+C to exit."
|
||||
read -r -p "> " continue < /dev/tty
|
||||
if [ "$continue" != "continue" ]; then
|
||||
die "Exiting..."
|
||||
fi
|
||||
log_info "Setup starts in 5 seconds, to abort use Ctrl+C to exit NOW."
|
||||
sleep 5
|
||||
|
||||
echo ""
|
||||
log_info "Starting setup..."
|
||||
}
|
||||
|
||||
@@ -304,6 +302,11 @@ check_compatibility() {
|
||||
attempt_package_install "tail"
|
||||
attempt_package_install "git"
|
||||
|
||||
# Check if we are a user or root
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
die "This script should not be run as root. Please run as a regular user."
|
||||
fi
|
||||
|
||||
local distro
|
||||
distro=$(awk -F= '/^NAME/{print $2}' /etc/os-release | tr -d '"')
|
||||
|
||||
|
Reference in New Issue
Block a user