Created
May 26, 2019 06:09
-
-
Save saagarjha/3f4848497cfaa22250ea7161a9975251 to your computer and use it in GitHub Desktop.
OpenRC init script to run a webserver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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