diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-01-06 17:38:53 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-01-06 17:38:53 +0100 |
commit | d56dcab5d48c8c4ec05f200f92bd35a1f977cd4f (patch) | |
tree | 6bc154635899269fddec8f8137476fd432a3edac /module/web | |
parent | webinterface fix (diff) | |
download | pyload-d56dcab5d48c8c4ec05f200f92bd35a1f977cd4f.tar.xz |
cli fix, webinterface db check
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/ServerThread.py | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | module/web/manage.py | 0 | ||||
-rw-r--r-- | module/web/pyload_default.db | bin | 44032 -> 0 bytes |
3 files changed, 11 insertions, 0 deletions
diff --git a/module/web/ServerThread.py b/module/web/ServerThread.py index 069cabafe..8be3892b5 100644 --- a/module/web/ServerThread.py +++ b/module/web/ServerThread.py @@ -2,6 +2,7 @@ from __future__ import with_statement import threading from os.path import join +from os.path import exists from subprocess import Popen, PIPE, STDOUT from time import sleep from signal import SIGINT @@ -18,6 +19,16 @@ class WebServer(threading.Thread): host = self.pycore.config['webinterface']['host'] port = self.pycore.config['webinterface']['port'] command = ['python',join(self.pycore.path,"module","web","manage.py"), "runserver", "%s:%s" % (host,port)] + + if not exists(join(self.pycore.path,"module","web","pyload.db")): + print "########## IMPORTANT ###########" + print "### Database for Webinterface doesnt exitst, it will not be available." + print "### Please run: python %s syncdb" % join(self.pycore.path,"module","web","manage.py") + print "### You have to add at least one User, to gain access to webinterface: python %s createsuperuser" % join(self.pycore.path,"module","web","manage.py") + print "### Dont forget to restart pyLoad if you are done." + print "################################" + raise Exception, "Database doesnt exists, please use syncdb" + self.pycore.logger.info("Starting Webserver: %s:%s" % (host,port) ) if os.name == 'posix': diff --git a/module/web/manage.py b/module/web/manage.py index 6a00ab565..6a00ab565 100644..100755 --- a/module/web/manage.py +++ b/module/web/manage.py diff --git a/module/web/pyload_default.db b/module/web/pyload_default.db Binary files differdeleted file mode 100644 index cd39d0ca8..000000000 --- a/module/web/pyload_default.db +++ /dev/null |