Cannot root

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_cannot_root

Purpose

Refuse to run the current script with root privileges.

Side effects

Exits the process if EUID is 0.

Returns

  • 0 when running as a non-root user; exits with status 1 if root.

Usage

  sgnd_cannot_root