fabric appears to start apache2 but doesn't

后端 未结 6 584
不思量自难忘°
不思量自难忘° 2020-12-29 04:27

I\'m using fabric to remotely start a micro aws server, install git and a git repository, adjust apache config and then restart the server.

If at any point, from the

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-29 05:02

    using pty=False still didn't solve it for me. The solution that ended up working for me is doing a double-nohup, like so:

    run.sh

    #! /usr/bin/env bash
    nohup java -jar myapp.jar 2>&1 &
    

    fabfile.py

    ...
    sudo("nohup ./run.sh &> nohup.out", user=env.user, warn_only=True)
    ...
    

提交回复
热议问题