fix some cli bugs, update manifest, Fix #29
This commit is contained in:
parent
3be7ad1ab6
commit
2e38c6a34c
7 changed files with 26 additions and 28 deletions
|
@ -4,6 +4,7 @@ import hashlib
|
|||
import json
|
||||
import string
|
||||
import random
|
||||
import sys
|
||||
from jinja2 import Template
|
||||
|
||||
|
||||
|
@ -99,6 +100,15 @@ def to_canonical(s):
|
|||
def gravatar_url(email):
|
||||
return "//www.gravatar.com/avatar/" + hashlib.md5(email).hexdigest()
|
||||
|
||||
|
||||
def in_virtualenv():
|
||||
return hasattr(sys, 'real_prefix')
|
||||
|
||||
|
||||
def is_su():
|
||||
return os.geteuid() == 0
|
||||
|
||||
|
||||
def upstart_script(user='root', app_dir=None, port=5000, workers=2, path=None):
|
||||
script = """
|
||||
limit nofile 65335 65335
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue