Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
Nishukumar | 376ba1e | 2018-08-03 09:17:23 +0000 | [diff] [blame^] | 2 | # Modifications Copyright © 2018 AT&T,VMware |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 3 | # |
| 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 | |
| 24 | pid="$(pgrep -f '/usr/local/bin/conductor')" |
| 25 | if [ -z "$pid" ] |
| 26 | then |
| 27 | echo 1 |
| 28 | else |
| 29 | echo 0 |
| 30 | fi |