[ale] writing a demo systemd service

Leam Hall leamhall at gmail.com
Wed Jul 20 12:06:36 EDT 2022


Anyone know enough systemd to help me write a demo service? It needs to be simple enough to explain in 15 minutes, run a python based httpd server, and detailed enough to point towards best practices. It will run on RHEL 7 and 8, here's what I have so far:

### file: /etc/systemd/system/pyhttpd.service
#
# [Unit]
# Description=Python based HTTPD
# After=network.target
#
# [Service]
# Type=simple
# ExecStart=/usr/local/bin/httpd_server.py
# Restart=on-failure

I realize there are many options (non-systemd, non-python httpd), but this is what I have and I need to show others how to do it.

Thanks!

Leam

-- 
Automation Engineer        (reuel.net/resume)
Scribe: The Domici War     (domiciwar.net)
General Ne'er-do-well      (github.com/LeamHall)


More information about the Ale mailing list