Ver Fonte

added fn_rootcheck

Daniel Gibbs há 11 anos atrás
pai
commit
af0bc60e00
1 ficheiros alterados com 10 adições e 0 exclusões
  1. 10 0
      functions/fn_rootcheck

+ 10 - 0
functions/fn_rootcheck

@@ -0,0 +1,10 @@
+#!/bin/bash
+# LGSM fn_rootcheck function
+# Author: Daniel Gibbs
+# Website: http://danielgibbs.co.uk
+# Version: 011214
+
+if [ $(whoami) = "root" ]; then
+	fn_printfailnl "Script will not run as root!"
+	exit
+fi