Skip to content

Instantly share code, notes, and snippets.

View cpaelzer's full-sized avatar

Christian Ehrhardt cpaelzer

  • Canonical LTD
  • Germany
View GitHub Profile
@cpaelzer
cpaelzer / README-python-service-on-systemd-activated-socket.md
Created October 15, 2018 07:11
Debug for hardening systemd socket activation on failing services

README

The example below creates a Unix Socket server listening on a stream (i.e. SOCK_STREAM) socket. A similar approach can be followed to create a UDP server on a datagram (i.e. SOCK_DGRAM) socket. See man systemd.socket for details.

An example server

Create an simple echo server at /opt/foo/serve.py.

@cpaelzer
cpaelzer / README-python-service-on-systemd-activated-socket.md
Created October 15, 2018 06:31 — forked from drmalex07/README-python-service-on-systemd-activated-socket.md
An example network service with systemd-activated socket in Python. #systemd #python #socket #socket-activation

README

The example below creates a Unix Socket server listening on a stream (i.e. SOCK_STREAM) socket. A similar approach can be followed to create a UDP server on a datagram (i.e. SOCK_DGRAM) socket. See man systemd.socket for details.

An example server

Create an simple echo server at /opt/foo/serve.py.