2018-11-13 07:57:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
function cleanup()
|
|
|
|
{
|
|
|
|
local pids=`jobs -p`
|
2019-02-22 08:14:50 +00:00
|
|
|
if [[ "${pids}" != "" ]]; then
|
|
|
|
kill ${pids} >/dev/null 2>/dev/null
|
2018-11-13 07:57:44 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2019-01-19 11:29:38 +00:00
|
|
|
service="all"
|
2019-02-22 08:14:50 +00:00
|
|
|
if [[ "$1" != "" ]];then
|
2019-01-19 11:29:38 +00:00
|
|
|
service=$1
|
|
|
|
fi
|
|
|
|
|
2019-02-22 08:33:27 +00:00
|
|
|
trap cleanup EXIT
|
2019-02-22 08:14:50 +00:00
|
|
|
if [[ "$1" == "bash" ]];then
|
|
|
|
bash
|
2019-02-22 08:33:27 +00:00
|
|
|
else
|
|
|
|
python jms start ${service}
|
2019-02-22 08:14:50 +00:00
|
|
|
fi
|
|
|
|
|