def update_json(self): myprint("Updating QuadF forms", bcolors.BOLD, True) # calls exactly what is writen in the string on the command line subprocess.call( [self.quadf_dir + "/qa/scripts/webdevjsonupdate " + self.quadf_dir + "/client/web/qdf/"], shell=True ) myprint("Updating QuadF forms Complete\n", bcolors.OKGREEN, True)
def clone_git(self): myprint("\nBegining to Clone QuadF from Github", bcolors.BOLD, True) if create_dir_if_not_already_there(self.quadf_dir, "https://github.intuit.com/QuadF/QuadF.git"): myprint("Note: ", bcolors.BOLD, False) print "Delete Folders if you want them to be replaced." myprint("Successful Clone from Git\n", bcolors.OKGREEN, True) else: myprint("Note: ", bcolors.BOLD, False) print "Delete Folders if you want them to be replaced." myprint("Repository already cloned\n", bcolors.OKGREEN, True)
def restart_apache(self): myprint("Files Edited. Restarting Apache...", bcolors.BOLD, True) apache_check = subprocess.Popen(["httpd", "-t"], stdout=subprocess.PIPE).communicate()[0] if apache_check.find("Syntax OK"): subprocess.call(["sudo", "apachectl", "stop"]) subprocess.call(["sudo", "apachectl", "start"]) myprint("Apache restart complete\n", bcolors.OKGREEN, True) else: myprint("Syntax Error with Apache", bcolors.FAIL, True)