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
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) ...