Typo and logical fixes in basic installation

This commit is contained in:
Disassembler 2018-08-02 11:15:15 +02:00
parent cbed880961
commit 50e4ef0330
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
3 changed files with 8 additions and 5 deletions

View File

@ -40,6 +40,7 @@ wget https://raw.githubusercontent.com/Neilpang/acme.sh/master/acme.sh -O /usr/b
sed -i 's|$HOME/.$PROJECT_NAME|/etc/acme.sh.d|' /usr/bin/acme.sh sed -i 's|$HOME/.$PROJECT_NAME|/etc/acme.sh.d|' /usr/bin/acme.sh
# Copy Spotter resources # Copy Spotter resources
cp ${SOURCE_DIR}/etc/init.d/spotter-appmgr /etc/init.d/spotter-appmgr
cp -r ${SOURCE_DIR}/srv/spotter /srv/spotter cp -r ${SOURCE_DIR}/srv/spotter /srv/spotter
ln -s /srv/spotter/cli.py /usr/bin/spotter-appmgr ln -s /srv/spotter/cli.py /usr/bin/spotter-appmgr
@ -58,4 +59,5 @@ service docker start
docker build -t alpine ${SOURCE_DIR} docker build -t alpine ${SOURCE_DIR}
# Set dummy host and generate related files # Set dummy host and generate related files
spotter-appmgr update-host spotter.vm 443 # Note: This will fail with an exception due to nonexistant application files. The exception can be ignored
spotter-appmgr update-host spotter.vm 443 || true

View File

@ -271,7 +271,8 @@ class AppMgr:
def update_apps_urls(self): def update_apps_urls(self):
# Update configuration for respective applications # Update configuration for respective applications
confupdater.update_url() host = self.domain if self.port != '443' else '{}:{}'.format(self.domain, self.port)
confupdater.update_url(host)
# Restart currently running apps in order to update config and re-register nginx proxy # Restart currently running apps in order to update config and re-register nginx proxy
for app in self.conf['apps']: for app in self.conf['apps']:
if tools.is_service_started(app): if tools.is_service_started(app):

View File

@ -54,11 +54,11 @@ def update_gmaps_api_key(api_key):
def update_email(email): def update_email(email):
# CKAN # CKAN
replace_file_line('/srv/ckan/conf/ckan.ini', 'smtp.mail_from = ', email) replace_file_line('/srv/ckan/conf/ckan.ini', 'smtp.mail_from = ', email)
replace_file_line('/srv/ckan-datapusher/conf/datapusher_settings.py', 'FROM_EMAIL = ', '\'{}\''.format(email) replace_file_line('/srv/ckan-datapusher/conf/datapusher_settings.py', 'FROM_EMAIL = ', '\'{}\''.format(email))
# Crisis Cleanup # Crisis Cleanup
replace_file_line('/srv/crisiscleanup/conf/initializers/devise.rb', ' config.mailer_sender = ', '\'{}\''.format(email) replace_file_line('/srv/crisiscleanup/conf/initializers/devise.rb', ' config.mailer_sender = ', '\'{}\''.format(email))
# CTS # CTS
replace_file_line('/srv/cts/conf/spotter.py', 'SERVER_EMAIL = ', '\'{}\''.format(email) replace_file_line('/srv/cts/conf/spotter.py', 'SERVER_EMAIL = ', '\'{}\''.format(email))
# GNU Health # GNU Health
replace_file_line('/srv/gnuhealth/conf/trytond.conf', 'from = ', email) replace_file_line('/srv/gnuhealth/conf/trytond.conf', 'from = ', email)
# KanBoard # KanBoard