Skip to content

Instantly share code, notes, and snippets.

@chmouel
Created October 28, 2016 06:20
Show Gist options
  • Save chmouel/8b57234b1efb6f9236e3a43e0bd39000 to your computer and use it in GitHub Desktop.
Save chmouel/8b57234b1efb6f9236e3a43e0bd39000 to your computer and use it in GitHub Desktop.
[Unit]
Description=Job that runs the python SimpleHTTPServer daemon
[Service]
Type=idle
WorkingDirectory=/media/bigdisk
ExecStart=/usr/bin/python -m SimpleHTTPServer 8888
TimeoutStopSec=1
Restart=always
RestartSec=2
StartLimitInterval=0
[Install]
WantedBy=multi-user.target
@chmouel
Copy link
Author

chmouel commented Oct 28, 2016

inspired by https://gist.github.com/funzoneq/737cd5316e525c388d51877fb7f542de but modified to run in foreground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment