summaryrefslogtreecommitdiff
path: root/exit.go
diff options
context:
space:
mode:
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)