From 48dc1ac8d3b313331a7766b8eb93560c3667415a Mon Sep 17 00:00:00 2001 From: Tom Early Date: Wed, 16 Jan 2019 10:59:10 -0700 Subject: [PATCH] control c trap --- qnadmin | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/qnadmin b/qnadmin index a185bcc..c0d0d00 100755 --- a/qnadmin +++ b/qnadmin @@ -15,6 +15,15 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +trap ControlC INT + +ControlC () { + sudo killall journalctl + if [ $? -ne 0 ]; then + exit 0 + fi +} + InstallSystem () { local n if [ -z ${1} ]; then @@ -166,7 +175,7 @@ LogMenu () { clear echo " Log Menu" echo - echo "After starting a log, use -C to stop the log and return to this menu." + echo "After starting a log, use +C to stop the log and return to this menu." echo if [[ $GateState == 'running' ]]; then echo " g : qngateway Log"