start a background process with nohup using fabric

后端 未结 10 2081
广开言路
广开言路 2020-12-04 22:31

am trying to start a celerycam process using fabric using the below nohup command. Unfortunately, nothing is happening, manually using the same command i could start the pro

10条回答
  •  独厮守ぢ
    2020-12-04 23:06

    This worked for me:

    sudo('python %s/manage.py celerycam --detach --pidfile=celerycam.pid' % siteDir)
    

    Edit: I had to make sure the pid file was removed first so this was the full code:

    # Create new celerycam
    sudo('rm celerycam.pid', warn_only=True)
    sudo('python %s/manage.py celerycam --detach --pidfile=celerycam.pid' % siteDir)
    

提交回复
热议问题