fix install
This commit is contained in:
parent
35f23995aa
commit
7a0a04bdb3
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.0.30"
|
SCOVERSION = "9.0.31"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ then
|
|||||||
echo
|
echo
|
||||||
echo "Création des tables et du compte admin"
|
echo "Création des tables et du compte admin"
|
||||||
echo
|
echo
|
||||||
msg="Saisir le mot de passe de l\'administrateur \(admin\):"
|
msg="Saisir le mot de passe de l\'administrateur \(admin, via le web\):"
|
||||||
su -c "(cd /opt/scodoc; source venv/bin/activate; flask db upgrade; flask sco-db-init; echo; echo $msg; flask user-password admin)" "$SCODOC_USER" || die "Erreur: sco-db-init"
|
su -c "(cd /opt/scodoc; source venv/bin/activate; flask db upgrade; flask sco-db-init; echo; echo $msg; flask user-password admin)" "$SCODOC_USER" || die "Erreur: sco-db-init"
|
||||||
echo
|
echo
|
||||||
echo "Base initialisée et admin créé."
|
echo "Base initialisée et admin créé."
|
||||||
@ -135,6 +135,7 @@ systemctl start scodoc9
|
|||||||
echo
|
echo
|
||||||
echo "Service configuré et démarré."
|
echo "Service configuré et démarré."
|
||||||
echo "Vous pouvez vous connecter en web et vous identifier comme \"admin\"."
|
echo "Vous pouvez vous connecter en web et vous identifier comme \"admin\"."
|
||||||
|
echo "ou bien importer vos données et comptes de la version ScoDoc 7."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,16 +4,18 @@
|
|||||||
# Ne touche pas aux données (/opt/scodoc-data)
|
# Ne touche pas aux données (/opt/scodoc-data)
|
||||||
# N'enlève complètement /opt/scodoc qui si --purge
|
# N'enlève complètement /opt/scodoc qui si --purge
|
||||||
|
|
||||||
systemctl stop scodoc9
|
systemctl stop scodoc9 || echo "scodoc9 non lancé"
|
||||||
systemctl disable scodoc9
|
systemctl disable scodoc9 || echo "scodoc9 systemd non configuré"
|
||||||
|
|
||||||
if [ "$#" == 1 ] && [ "$1" == "purge" ]
|
if [ "$#" == 1 ] && [ "$1" == "purge" ]
|
||||||
then
|
then
|
||||||
/bin/rm -rf /opt/scodoc
|
/bin/rm -rf /opt/scodoc
|
||||||
/bin/rm -f scodoc9.service
|
/bin/rm -f /etc/systemd/system/scodoc9.service
|
||||||
/bin/rm -f /etc/systemd/system/scodoc-updater.service
|
/bin/rm -f /etc/systemd/system/scodoc-updater.service
|
||||||
/bin/rm -f /etc/systemd/system/scodoc-updater.timer
|
/bin/rm -f /etc/systemd/system/scodoc-updater.timer
|
||||||
/bin/rm -f /etc/nginx/sites-enabled/scodoc9.nginx
|
/bin/rm -f /etc/nginx/sites-enabled/scodoc9.nginx
|
||||||
|
systemctl daemon-reload
|
||||||
fi
|
fi
|
||||||
|
|
||||||
systemctl reload nginx
|
systemctl reload nginx || echo 'nginx non fonctionnel'
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ def get_class_for_table(table):
|
|||||||
|
|
||||||
|
|
||||||
def get_boolean_columns(klass):
|
def get_boolean_columns(klass):
|
||||||
"return list of names of boolean attributes in this model"
|
"return list of names of boolean attributes in this (ScoDoc 9) model"
|
||||||
boolean_columns = []
|
boolean_columns = []
|
||||||
column_names = sqlalchemy.inspect(klass).columns.keys()
|
column_names = sqlalchemy.inspect(klass).columns.keys()
|
||||||
for column_name in column_names:
|
for column_name in column_names:
|
||||||
@ -412,7 +412,8 @@ def convert_object(
|
|||||||
obj[k] = uid
|
obj[k] = uid
|
||||||
# Converti les booléens
|
# Converti les booléens
|
||||||
for k in boolean_columns:
|
for k in boolean_columns:
|
||||||
obj[k] = bool(obj[k])
|
if k in obj:
|
||||||
|
obj[k] = bool(obj[k])
|
||||||
|
|
||||||
# Ajoute le département si besoin:
|
# Ajoute le département si besoin:
|
||||||
if hasattr(klass, "dept_id"):
|
if hasattr(klass, "dept_id"):
|
||||||
|
Loading…
Reference in New Issue
Block a user