mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Started handling nginx config
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
from prompt_toolkit import prompt as prm
|
||||
|
||||
|
||||
@@ -16,39 +18,60 @@ class TerminalDisplay:
|
||||
def installer(self):
|
||||
questions = [
|
||||
{
|
||||
"message": "Input the absolute path to your ebooks\nEnter for default \"~/Books\" > ",
|
||||
"message": 'Input the absolute path to your ebooks\nEnter for default "~/Books" > ',
|
||||
"options": "",
|
||||
"name": "BOOKPATH",
|
||||
"answer": None,
|
||||
"default": self.home+"/Books"
|
||||
"default": self.home + "/Books",
|
||||
},
|
||||
{
|
||||
"message": "Input your PostgreSQL server ip\nEnter for default \"localhost\" > ",
|
||||
"message": 'Input your PostgreSQL server ip\nEnter for default "localhost" > ',
|
||||
"options": "localhost",
|
||||
"name": "DB_HOST",
|
||||
"answer": None,
|
||||
"default": "localhost"
|
||||
"default": "localhost",
|
||||
},
|
||||
{
|
||||
"message": "Input your PostgreSQL server port\nEnter for default \"5432\" > ",
|
||||
"message": 'Input your PostgreSQL server port\nEnter for default "5432" > ',
|
||||
"options": "5432",
|
||||
"name": "DB_PORT",
|
||||
"answer": None,
|
||||
"default": "5432"
|
||||
"default": "5432",
|
||||
},
|
||||
{
|
||||
"message": "Input your PostgreSQL user name\nEnter for default \"pyshelf\" > ",
|
||||
"message": 'Input your PostgreSQL user name\nEnter for default "pyshelf" > ',
|
||||
"options": "pyshelf",
|
||||
"name": "USER",
|
||||
"answer": None,
|
||||
"default": "pyshelf"
|
||||
"default": "pyshelf",
|
||||
},
|
||||
{
|
||||
"message": "Input your PostgreSQL password\nEnter for default \"pyshelf\" > ",
|
||||
"message": 'Input your PostgreSQL password\nEnter for default "pyshelf" > ',
|
||||
"options": "pyshelf",
|
||||
"name": "PASSWORD",
|
||||
"answer": None,
|
||||
"default": "pyshelf"
|
||||
"default": "pyshelf",
|
||||
},
|
||||
{
|
||||
"message": 'Web ui hostname/ip\nEnter for default "localhost" > ',
|
||||
"options": "localhost",
|
||||
"name": "hostname",
|
||||
"answer": None,
|
||||
"default": "localhost",
|
||||
},
|
||||
{
|
||||
"message": 'Web ui port\nEnter for default "8000" > ',
|
||||
"options": "8000",
|
||||
"name": "webport",
|
||||
"answer": None,
|
||||
"default": "8000",
|
||||
},
|
||||
{
|
||||
"message": 'wsgi port\nEnter for default "8001"\n"You should probably leave this alone, unless you know what you\'re doing" > ',
|
||||
"options": "8001",
|
||||
"name": "wsgiport",
|
||||
"answer": None,
|
||||
"default": "8001",
|
||||
},
|
||||
]
|
||||
return self.prompt(questions)
|
||||
|
||||
Reference in New Issue
Block a user