Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

198
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda