date parameter; use default pg conf location if not set; use sudo as necessary