[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[3224] trunk/tools/prepare-company-database.sh



Revision: 3224
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3224&view=rev
Author:   ehuelsmann
Date:     2011-06-11 17:44:33 +0000 (Sat, 11 Jun 2011)

Log Message:
-----------
Add warning when not running as 'root' user.

Modified Paths:
--------------
    trunk/tools/prepare-company-database.sh

Modified: trunk/tools/prepare-company-database.sh
===================================================================
--- trunk/tools/prepare-company-database.sh	2011-06-11 16:13:17 UTC (rev 3223)
+++ trunk/tools/prepare-company-database.sh	2011-06-11 17:44:33 UTC (rev 3224)
@@ -74,6 +74,13 @@
 
 }
 
+# Am I root?
+if ! test `whoami` = "root"
+then
+  echo "WARNING: you're not running as 'root';"
+  echo "you will need the 'postgres' user's password!"
+fi
+
 # Extract options and setup variables
 if ! options=$( getopt -u -l company:,coa:,gifi:,srcdir:,dstdir:,password:,host:,port:,help,progress,pgsql-contrib: '' "$@" )
 then


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.