#!/bin/bash

IS_OK=0

PUSH_CLIENT=$(which push-client)

if [ "x$PUSH_CLIENT" != "x" ]
then
    # Golopush зависает, когда push-client пишет много в stderr
    $PUSH_CLIENT --status -c /etc/yandex/statbox-push-client/push-client.yaml 2>/dev/null
    [ $? -eq 0 ] && IS_OK=1
fi


echo prj = passport.social
echo ttl = 5
echo social-push-client-runtime.status_ok_count._tmmn = $IS_OK
