Remove default web2py apps

This commit is contained in:
Disassembler 2017-09-10 21:38:31 +02:00
parent 9cca1e60c8
commit 0ac3b1660d

View File

@ -20,6 +20,7 @@ sudo -u postgres psql -f /tmp/sahana-createdb.sql
rm -f /tmp/sahana-createdb.sql
# Configure web2py
rm -rf /srv/sahana/applications/{admin,examples,welcome}
cp ${SOURCE_DIR}/sahana/srv/sahana/routes.py /srv/sahana/routes.py
cp ${SOURCE_DIR}/sahana/srv/sahana/run_scheduler.py /srv/sahana/run_scheduler.py
ln -s /srv/sahana/handlers/wsgihandler.py /srv/sahana/wsgihandler.py
@ -31,16 +32,10 @@ mkdir -p /srv/sahana/applications/eden/uploads/{gis_cache,images,tracks}
export SAHANA_HMAC=$(head -c 18 /dev/urandom | base64)
export SAHANA_ADMIN_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/sahana/srv/sahana/applications/eden/models/000_config.py >/srv/sahana/applications/eden/models/000_config.py
#cp ${SOURCE_DIR}/sahana/srv/sahana/applications/eden/modules/templates/default/config.py /srv/sahana/applications/eden/modules/templates/default/config.py
cp ${SOURCE_DIR}/sahana/srv/sahana/applications/eden/modules/templates/default/config.py /srv/sahana/applications/eden/modules/templates/default/config.py
envsubst <${SOURCE_DIR}/sahana/srv/sahana/applications/eden/modules/templates/default/users/masterUsers.csv >/srv/sahana/applications/eden/modules/templates/default/users/masterUsers.csv
cp ${SOURCE_DIR}/sahana/srv/sahana/applications/eden/languages/cz.py /srv/sahana/applications/eden/languages/cz.py
# Patch bugs
#cp ${SOURCE_DIR}/sahana/srv/sahana/applications/eden/modules/s3/s3resource.py /srv/sahana/applications/eden/modules/s3/s3resource.py
#cp ${SOURCE_DIR}/sahana/srv/sahana/applications/eden/modules/s3db/delphi.py /srv/sahana/applications/eden/modules/s3db/delphi.py
#cp ${SOURCE_DIR}/sahana/srv/sahana/applications/eden/modules/s3db/org.py /srv/sahana/applications/eden/modules/s3db/org.py
#cp ${SOURCE_DIR}/sahana/srv/sahana/gluon/contrib/login_methods/openid_auth.py /srv/sahana/gluon/contrib/login_methods/openid_auth.py
# Create OS user
adduser --system --group --home /srv/sahana --shell /bin/false sahana
chown -R sahana:sahana /srv/sahana
@ -80,9 +75,9 @@ systemctl restart nginx
# WARNING: S3Msg unresolved dependency tweepy required for non-Tropo Twitter support
# WARNING: Message Parsing unresolved dependency: TwitterSearch required for fetching results from twitter keyword queries
# TODO: remove default web2py apps
# TODO: Development notes - to be deleted
# TODO: Development notes
# vi /srv/sahana/applications/eden/modules/templates/default/config.py
# vi /srv/sahana/applications/eden/modules/s3cfg.py
# sudo -u sahana /srv/sahana/web2py.py -i 192.168.2.202 -a sahana --nogui
# sudo -u sahana openssl req -new -x509 -nodes -out /srv/sahana/cert.pem -keyout /srv/sahana/cert.key -subj "/C=CZ/CN=$(hostname -f)"
# sudo -u sahana /srv/sahana/web2py.py -i 192.168.2.202 -a sahana -c /srv/sahana/cert.pem -k /srv/sahana/cert.key --nogui