i have googled a lot,and in fabric faq also said use screen dtach with it ,but didn't find how to implement it? bellow is my wrong code,the sh will not execute as excepted it is a nohup task
def dispatch():run("cd /export/workspace/build/ && if [ -f spider-fetcher.zip ];then mv spider-fetcher.zip spider-fetcher.zip.bak;fi")put("/root/build/spider-fetcher.zip","/export/workspace/build/")run("cd /export/script/ && sh ./restartCrawl.sh && echo 'finished'")