def GetPostgresql_confile(self, postgres_conf_dir, conObj): res = self._sys_Exec.FileTransfer( conObj, "GET", "./confiles/{x}".format(x=fileC.File_Config().PSQL_confRoot()), postgres_conf_dir) if res[0]: if os.path.exists("./confiles/{x}".format( x=fileC.File_Config().PSQL_confRoot())): return True return False
def LocalPostgresqlDIR(self): dir_c = './confiles/{y}'.format(y=fileC.File_Config().PSQL_confRoot()) return dir_c
def MakePostgresql_confPermit(self, postgres_v): dir_c = "../../etc/postgresql/{x}/main/{y}".format( x=postgres_v, y=fileC.File_Config().PSQL_confRoot()) permit_Q = 'sudo chmod -v 644 {y}'.format(y=dir_c) return permit_Q
def PostgresqlDIR(self, postgres_v): dir_c = "../../etc/postgresql/{x}/main/{y}".format( x=postgres_v, y=fileC.File_Config().PSQL_confRoot()) return dir_c
def ChangepostgresqlPermit(self, postgres_v): dir_c = "../../etc/postgresql/{x}/main/{y}".format( x=postgres_v, y=fileC.File_Config().PSQL_confRoot()) change_pc = "sudo chmod 777 {y}".format(y=dir_c) return change_pc
def MoveRecovery_Dest(self, postgres_v): dir_c = "sudo cp -avr ../../usr/share/postgresql/{x}/recovery.conf.sample /../../var/lib/postgresql/{x}/main/recovery.conf".format( x=postgres_v, y=fileC.File_Config().PSQL_RecoveryRoot()) print(dir_c) return dir_c
def MakePostgresql_RecoveryPermit(self, postgres_v): dir_c = "../../usr/share/postgresql/{x}/{y}".format( x=postgres_v, y=fileC.File_Config().PSQL_RecoveryRoot()) permit_Q = 'sudo chmod -v 644 {y}'.format(y=dir_c) return permit_Q
def ChangepostgresqlRecoveryPermit(self, postgres_v): dir_c = "../../usr/share/postgresql/{x}/{y}".format( x=postgres_v, y=fileC.File_Config().PSQL_RecoveryRoot()) change_pc = "sudo chmod 777 {y}".format(y=dir_c) return change_pc
def LocalRecoveryDIR(self): dir_c = './confiles/{y}'.format( y=fileC.File_Config().PSQL_RecoveryRoot()) return dir_c