Wesllen Matias

Logo

Analista de Sistemas, Sysadmin, Viciado em Linux, Novas Tecnologias, Shell Script, Python, IaC e DevOps =)

View My GitHub Profile

15 April 2020

Status Sefaz com Bot Telegram

by Wesllen Matias

nfe-icn

Neste post vou mostrar como utilizar o bot telegram que desenvolvi para poder capturar o status atual da sefaz, para ter de forma rapida e na mão o status da Sefaz quando for necessário.

Para rodar o scrip como serviço em seu servidor siga os passos abaixo:

apt-get install jq -y

apt-get install lynx -y
git clone https://github.com/WesllenMatias/sefaz.git
bot_token='[add aqui o token do seu bot]'
chmod +x sefaz.sh

chmod +x ShellBot.sh
[Unit]
Description=Sefaz

[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/local/do/sefaz.sh start
ExecStop=/local/do/sefaz/sefaz.sh stop
ExecReload=/local/do/sefaz/sefaz.sh restart

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
systemctl enable sefaz

OBS: Dentro do Fonte sefaz.sh em source coloque o caminho absoluto de onde fica o ShellBot.sh

Resultado:

Mensagem do Bot

tags: telegram