summaryrefslogtreecommitdiff
path: root/exit.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-03 06:49:33 -0500
committerJeff Carr <[email protected]>2025-10-03 06:49:33 -0500
commit4574971b222384f3f0f1a5f41ce03ac7e495d682 (patch)
treeb1aba2cd3bb699cc170c252a0531459a981847a0 /exit.go
parent322ec42ce6da80915a80ed36f02bc6a15c238fb2 (diff)
more argv options
Diffstat (limited to 'exit.go')
-rw-r--r--exit.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/exit.go b/exit.go
index 22054cc..9228476 100644
--- a/exit.go
+++ b/exit.go
@@ -18,6 +18,13 @@ func checkSuperuser() {
}
}
+func areSuperuser() bool {
+ if os.Getuid() == 0 {
+ return true
+ }
+ return false
+}
+
func exitOnError(cmd []string) {
var err error
log.Info("Running:", cmd)