File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
docs/script/getting_started Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 2828# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929import os
3030import sys
31+ import signal
3132from subprocess import call
3233import subprocess
3334import json
4142 "2 - AMD Zen 2" ,
4243 "3 - AMD Zen 3" ]
4344
45+ def signal_handler (sig , frame ):
46+ print ('You sent SIGINT signal, stoping docker compose stack' )
47+ call ("./stop.sh" )
48+
4449
4550def start_demo ():
4651 """
@@ -54,7 +59,8 @@ def start_demo():
5459 "\n " + list_arch [2 ] +
5560 "\n " + list_arch [3 ] +
5661 "\n " )
57-
62+
63+ signal .signal (signal .SIGINT , signal_handler )
5864 val = ""
5965 choice = True
6066 while choice :
Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ docker compose logs formula -f &
88
99sleep 120
1010
11- docker compose down
11+ ./stop.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -ueo pipefail
3+ set +x
4+
5+ docker compose down
You can’t perform that action at this time.
0 commit comments