X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Fblackbox%2Ftest_case_meta_conn_01%2Ftest%2Fnode_step.sh;fp=test%2Fblackbox%2Ftest_case_meta_conn_01%2Ftest%2Fnode_step.sh;h=fe28423a9c0da0e9653cd692eec14ba6b75c958f;hb=cdb3dada645394bb1e0d0bf7816291fbd9a2a4a0;hp=0000000000000000000000000000000000000000;hpb=6354733cc5044c5226c430d97262c06ab4cd0d5e;p=meshlink diff --git a/test/blackbox/test_case_meta_conn_01/test/node_step.sh b/test/blackbox/test_case_meta_conn_01/test/node_step.sh new file mode 100755 index 00000000..fe28423a --- /dev/null +++ b/test/blackbox/test_case_meta_conn_01/test/node_step.sh @@ -0,0 +1,25 @@ +# node_step.sh -- Script to send signal to control Mesh Node Simulation +# Copyright (C) 2018 Guus Sliepen +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# Read command-line arguments +prog_name=$1 +signal=$2 + +# Find instance of running program and send the named signal to it +pid=`/bin/pidof -s ${prog_name}` +kill -${signal} ${pid} +exit $?