Skip to content

Instantly share code, notes, and snippets.

@saagarjha
Created May 26, 2019 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saagarjha/3f4848497cfaa22250ea7161a9975251 to your computer and use it in GitHub Desktop.
Save saagarjha/3f4848497cfaa22250ea7161a9975251 to your computer and use it in GitHub Desktop.
OpenRC init script to run a webserver
#!/sbin/openrc-run
start() {
start-stop-daemon --start --chdir /share --background --exec /usr/bin/python3 -- -m http.server 80
}
stop() {
start-stop-daemon --stop --chdir /share --exec /usr/bin/python3 -- -m http.server
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment