diff --git a/docker/realms-wiki.sh b/docker/realms-wiki.sh index cd21fec..8fa50d8 100644 --- a/docker/realms-wiki.sh +++ b/docker/realms-wiki.sh @@ -1,7 +1,9 @@ #!/bin/sh +chdir /home/deploy/realms-wiki + if [ "${REALMS_WIKI_CONFIG}" != "" ]; then realms-wiki configure ${REALMS_WIKI_CONFIG} fi -exec /sbin/setuser deploy realms-wiki run >>/var/log/realms-wiki/realms-wiki.log 2>&1 \ No newline at end of file +exec /sbin/setuser deploy /home/deploy/realms-wiki/.venv/bin/python realms-wiki run >>/var/log/realms-wiki/realms-wiki.log 2>&1 diff --git a/install.sh b/install.sh index ae74def..735f7c1 100755 --- a/install.sh +++ b/install.sh @@ -53,7 +53,11 @@ sudo -iu ${APP_USER} virtualenv ${APP_DIR}/.venv sudo -iu ${APP_USER} ${APP_DIR}/.venv/bin/pip install ${APP_DIR} echo "Installing start scripts" -sudo ln -s ${APP_DIR}/.venv/bin/realms-wiki /usr/local/bin/realms-wiki +cat << EOF > /usr/local/bin/realms-wiki +#!/bin/bash +${APP_DIR}/.venv/bin/python ${APP_DIR}/manage.py "\$@" +EOF + sudo chmod +x /usr/local/bin/realms-wiki cat << EOF > /etc/init/realms-wiki.conf diff --git a/realms-wiki b/manage.py similarity index 99% rename from realms-wiki rename to manage.py index 58eb349..3356023 100755 --- a/realms-wiki +++ b/manage.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from gevent import wsgi from realms import config, app, cli, db from realms.lib.util import random_string diff --git a/setup.py b/setup.py index 2746f86..737eb81 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ with open('README.md') as f: with open('requirements.txt') as f: required = f.read().splitlines() -VERSION = '0.1.8' +VERSION = '0.1.9' CLASSIFIERS = [ 'Intended Audience :: Developers', @@ -21,7 +21,6 @@ setup(name='realms-wiki', version=VERSION, packages=find_packages(), install_requires=required, - scripts=['realms-wiki'], author='Matthew Scragg', author_email='scragg@gmail.com', maintainer='Matthew Scragg',