Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

200
Visualizações
How to get my smartThings python3 script working on apache webserver as a cgi file

My father and I are making a webserver so Grafana will be able to access a few python scripts; Grafana only allows you to add links to buttons. Earlier today we created the webserver. Then I started work on two python files, "smartThingy.py" and "printLight.cgi". After those were created I put them on the network hard drive and my dad moved them onto the centos 8 machine that was running apache. It worked after getting the files to not be in DOS format. Currently, we are getting a small error https://pastebin.com/TXhXFPwm . Can someone please help debug the code so we can turn on and off a light by going to http://PrivateIpOfTheServer/cgi-bin/printLight.cgi

Here is my code. Its only missing the bits that allows it to output text onto the page.

https://pastebin.com/qn2EMYhZ - smartThingy.py (a module so it will be easier to create more cgi files)

https://pastebin.com/9J8HMYS7 - printLight.cgi (controls light above 3d printers)

Edit: I am using https://pypi.org/project/pysmartthings/ for smartThings

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

SELinux is preventing /usr/libexec/platform-python3.6 from name_connect access on the tcp_socket port 443.

*****  Plugin catchall_boolean (47.5 confidence) suggests   ******************

If you want to allow httpd to can network connect
Then you must tell SELinux about this by enabling the 'httpd_can_network_connect' boolean.

Do
setsebool -P httpd_can_network_connect 1

SELinux was just being mean to us.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda