def create_custom_exec_script(self):
cfg_path = "<STR_LIT>".format(self.host)<EOL>if os.path.isfile(cfg_path):<EOL><INDENT>logger.info(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>self.host)<EOL>handle, cfg_path = tempfile.mkstemp('<STR_LIT>', '<STR_LIT>')<EOL>os.close(handle)<EOL><DEDENT>cmds = "<STR_LIT>"<EOL>for idx, cmd in enumerate(self.custom):<EOL><INDENT>cmds += "<STR_LIT>".format(idx=idx, cmd=cmd['<STR_LIT>'])<EOL><DEDENT>customs_script = """<STR_LIT>""".format(cmds=cmds)<EOL>with open(cfg_path, '<STR_LIT:w>') as fds:<EOL><INDENT>fds.write(customs_script)<EOL><DEDENT>return cfg_path<EOL>
bash script w/ custom commands inside
        inspired by half a night trying to avoid escaping bash special characters