summaryrefslogtreecommitdiff
path: root/test/regression/interoperability_test/mqtt_test/test_scripts/certificate_server.sh
blob: 495d211f1ed65fed32f238b1fc1a94e50068b5c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /bin/bash
##############################################################################
# Copyright (c) 2024 Microsoft Corporation
# Copyright (c) 2026 Eclipse ThreadX contributors
#
# This program and the accompanying materials are made available under the
# terms of the MIT License which is available at
# https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: MIT
##############################################################################


function kill_mqtt_server(){
    kill $mqtt_server_pid
    wait
}

dir=`dirname $0`
dir=`realpath $dir`
cd $dir
mosquitto -c ./mosquitto.conf -v $* &
mqtt_server_pid=$!
trap kill_mqtt_server TERM ALRM
wait