Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make webserver script executable #15

Closed
eby opened this issue Feb 29, 2016 · 1 comment
Closed

Make webserver script executable #15

eby opened this issue Feb 29, 2016 · 1 comment

Comments

@eby
Copy link

eby commented Feb 29, 2016

I've looked at OSX and a few linux distros. Especially ones that support having both 2.x and 3.x pythons installed. It seems that the executable python2.7 exists on all of them.

On my server I made webserver.py executable and added the following to the top:

!/usr/bin/env python2.7

That looks for the python2.7 in path vs a hard path. Maybe give it a try on your dev box and see if it causes issues. Seems to work wherever I put it.

This allows it to just run as ./webserver.py which helps in writing a init.d script to control it. I need to polish up the init.d script and then I'll share that in a support scripts folder along with nginx config.

@steiza
Copy link
Owner

steiza commented Mar 2, 2016

Yeah, this is a good idea.

Actually, while we're at it, I'm going to rename webserver.py -> docstore. Once things settle down a bit we could put this project on pypi and then people could do pip install docstore and after docstore will be in their sys bin path.

See fb621e8 for the changes.

@steiza steiza closed this as completed Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants