diff --git a/main.py b/debug_server.py similarity index 100% rename from main.py rename to debug_server.py diff --git a/supysonic.cgi b/supysonic.cgi new file mode 100755 index 0000000..f7e7549 --- /dev/null +++ b/supysonic.cgi @@ -0,0 +1,28 @@ +#!/usr/bin/python +# coding: utf-8 + +# This file is part of Supysonic. +# +# Supysonic is a Python implementation of the Subsonic server API. +# Copyright (C) 2013 Alban 'spl0k' Féron +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from wsgiref.handlers import CGIHandler +from web import create_application + +app = create_application() +if app: + CGIHandler().run(app) + diff --git a/supysonic.fcgi b/supysonic.fcgi new file mode 100755 index 0000000..25540ad --- /dev/null +++ b/supysonic.fcgi @@ -0,0 +1,28 @@ +#!/usr/bin/python +# coding: utf-8 + +# This file is part of Supysonic. +# +# Supysonic is a Python implementation of the Subsonic server API. +# Copyright (C) 2013 Alban 'spl0k' Féron +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from flup.server.fcgi import WSGIServer +from web import create_application + +app = create_application() +if app: + WSGIServer(app, bindaddress = '/path/to/fcgi.sock').run + diff --git a/main.wsgi b/supysonic.wsgi old mode 100644 new mode 100755 similarity index 98% rename from main.wsgi rename to supysonic.wsgi index 6296a97..5437096 --- a/main.wsgi +++ b/supysonic.wsgi @@ -18,7 +18,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import os.path +import sys sys.path.insert(0, '/path/to/the/supysonic/app') from web import create_application