From c2bc38564ce8a7fd0761ba5d627db671c927d335 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 2 Dec 2007 22:31:20 +0000 Subject: Hack for screen svn path=/scripts/apnic-poke-1.sh; revision=1347 --- scripts/apnic-poke-1.sh | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/scripts/apnic-poke-1.sh b/scripts/apnic-poke-1.sh index b200d366..aa4d9199 100644 --- a/scripts/apnic-poke-1.sh +++ b/scripts/apnic-poke-1.sh @@ -32,9 +32,15 @@ mysql -u rpki -p`awk '$1 == "sql-password" {print $3}' rpkid.conf` rpki <../docs rm -rf publication/* # Start rpkid so we can configure it, make sure we shut it down on exit +# If we're running under screen, just run it in a different screen instead. -python rpkid.py >>rpkid.log 2>&1 & rpkid=$! -trap "kill $rpkid" 0 1 2 3 13 15 +if test -n "$STY" +then + screen python rpkid.py +else + python rpkid.py >>rpkid.log 2>&1 & rpkid=$! + trap "kill $rpkid" 0 1 2 3 13 15 +fi # Create a self instance @@ -67,10 +73,19 @@ python irbe-cli.py child --self_id 1 --action create --bsc_id 1 --cms_ta biz-cer # Run the other daemons, arrange for everything to go away on shutdown, # run initial cron job to set things up, then wait -python testroot.py >>testroot.log 2>&1 & testroot=$! -python irdb.py >>irdb.log 2>&1 & irdb=$! -trap "kill $rpkid $irdb $testroot" 0 1 2 3 13 15 +if test -n "$STY" +then + screen python testroot.py + screen python irdb.py +else + python testroot.py >>testroot.log 2>&1 & testroot=$! + python irdb.py >>irdb.log 2>&1 & irdb=$! + trap "kill $rpkid $irdb $testroot" 0 1 2 3 13 15 +fi python http-client.py -tail +0f rpkid.log +if test -z "$STY" +then + tail +0f rpkid.log +fi -- cgit v1.2.3