Here's one to add root checking:

--- ./prepare-company-database.sh       2011-06-02 18:23:26.851794751 -0400
+++ ./prepare-company-database.sh.new   2011-06-02 19:47:01.000000000 -0400
@@ -74,6 +74,13 @@

  }

+# Am I root?
+if ! test `whoami` = root
+then
+echo "Warning: you are 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

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Ledger-smb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel

Reply via email to