metz: change wcs database configuration

This commit is contained in:
Emmanuel Cazenave 2022-04-12 11:20:00 +02:00
parent 52dd5ba1f5
commit b9d6709229
3 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,8 @@
from quixote import get_publisher
pub = get_publisher()
postgres_conf = pub.cfg['postgresql']
del postgres_conf['password']
postgres_conf['host'] = ''
postgres_conf['user'] = ''
pub.write_cfg()

4
metz/show_db_settings.py Normal file
View File

@ -0,0 +1,4 @@
from quixote import get_publisher
pub = get_publisher()
print(pub.cfg['postgresql'])

View File

@ -32,3 +32,7 @@ for directory in $VAR_LIBS; do
ln -s /usr/local/share/publik-devinst/themes/publik-base $theme
done
# change wcs database setting
/home/cazino/envs/publik-env-py3/bin/wcs-manage runscript -d demarches.services.metzmetropole.fr change_db_settings.py
sudo supervisorctl restart wcs
/home/cazino/envs/publik-env-py3/bin/wcs-manage runscript -d demarches.services.metzmetropole.fr show_db_settings.py