Example #1
0
 def start(self):
     if self.conf and not self.args:
         self.args = [os.path.join(self.path, self.conf)]
     
     out, err = shell(self.path, 'make')
     if out:
         logging.info('> make\n%s', out)
     
     return super(Service, self).start()
Example #2
0
 def start(self):
     if self.virtualenv:
         cmd = 'pip install -E %s %s' % (self.virtualenv, " ".join(self.requires))
         out, err = shell(self.path, cmd)
     
         if err:
             if "mysql-python" in self.requires:
                 logging.warning("mysql-python might require 'mysql_config'; 'apt-get install libmysqlclient-dev' or your package management equivalent might fix this problem.")
             logging.error('> %s\n%s', cmd, err)
             self.stop()
             return False
         elif out:
             logging.info('> %s\n%s', cmd, out)
     
     return super(PythonService, self).start()
Example #3
0
 def start(self):
     if self.before_deploy:
         cmds = self.before_deploy
         if isinstance(cmds, basestring):
             cmds = [cmds]
         
         for cmd in cmds:
             out, err = shell(self.path, cmd)
             if err:
                 logging.error('> %s\n%s', cmd, err)
                 self.stop()
                 return False
             elif out:
                 logging.info('> %s\n%s', cmd, out)
     
     self.disabled = False
     return True