Systemd Service More Simple Webserver

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

Service Datei

vi /etc/systemd/system/simple-http.service
[Unit]
Description=My Miscellaneous Service
After=network.target

[Service]
Type=simple
User=thomas
WorkingDirectory=/home/thomas/html
ExecStart=/usr/bin/python3 -m http.server
Restart=on-abort

[Install]
WantedBy=multi-user.target