def add_instance_to_supervisor(self, instance_name):
        """
        Creates the supervisor file into the directory
        """
        INSTANCE_DIR = os.path.join(icc.DEFAULT_INSTANCE_DIR, instance_name)
        try:
            template = os.path.join(INSTANCE_DIR, 'supervisor.conf')
            values = {
                'instance_name': instance_name,
                'instance_dir': INSTANCE_DIR
            }
            self._populate_file(template, values)
            os.symlink(template, os.path.join(
                '/etc', 'supervisord.d',
                'openmooc-askbot-%s.conf' % instance_name))
            print(' [ OK ] Populated the supervisor settings.')
        except:
            self.abort(' [ERROR] Couldn\'t populate the supervisor settings. '
                       'Exiting.')
dataset/ETHPy150Open OpenMOOC/askbot-openmooc/askbotopenmooc/utils/openmooc-askbot-instancetool.py/AskbotInstance.add_instance_to_supervisor/original