Explorar el Código

added fn_rootcheck

Daniel Gibbs hace 11 años
padre
commit
af0bc60e00
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  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