blob: d78777ad1c6de8ed3f34e0b6a74ef6669a81e361 [file] [log] [blame]
Ikram Ikramullah40b120b2018-05-01 11:35:40 -04001# Copyright © 2017 Amdocs, Bell Canada
Nishukumar376ba1e2018-08-03 09:17:23 +00002# Modifications Copyright © 2018 AT&T,VMware
Ikram Ikramullah40b120b2018-05-01 11:35:40 -04003#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16#!/bin/bash
17
18# Controller is a process that reads from Music Q
19# It uses no ports (TCP or HTTP). The PROB will check
20# if the controller process exists or not. In case
21# it exists, it will send 0, else send 1 so k8s can i
22# restart the container
23
24pid="$(pgrep -f '/usr/local/bin/conductor')"
25if [ -z "$pid" ]
26then
27 echo 1
28else
29 echo 0
30fi