diff --git a/app/models/departements.py b/app/models/departements.py
index 50ec0a9f..1dee2ca0 100644
--- a/app/models/departements.py
+++ b/app/models/departements.py
@@ -1,6 +1,6 @@
# -*- coding: UTF-8 -*
-"""ScoDoc8 models : departements
+"""ScoDoc models : departements
"""
from typing import Any
diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py
index 9dc747eb..e01b25e5 100644
--- a/app/models/formsemestre.py
+++ b/app/models/formsemestre.py
@@ -1,6 +1,6 @@
# -*- coding: UTF-8 -*
-"""ScoDoc8 models
+"""ScoDoc models
"""
from typing import Any
diff --git a/app/templates/main/index.html b/app/templates/main/index.html
index a09a0ab0..6e21ac46 100644
--- a/app/templates/main/index.html
+++ b/app/templates/main/index.html
@@ -6,7 +6,7 @@
-
Prototype ScoDoc 8
+
Prototype ScoDoc
diff --git a/app/views/scolar.py b/app/views/scolar.py
index 917e65eb..81df91bc 100644
--- a/app/views/scolar.py
+++ b/app/views/scolar.py
@@ -120,7 +120,7 @@ def sco_publish(route, function, permission, methods=["GET"]):
log.set_log_directory(Config.SCODOC_VAR_DIR + "/log")
-log("ScoDoc8 restarting...")
+log("ScoDoc restarting...")
# --------------------------------------------------------------------
#
diff --git a/sco_version.py b/sco_version.py
index 30c83fc9..38f59c89 100644
--- a/sco_version.py
+++ b/sco_version.py
@@ -1,14 +1,14 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
-SCOVERSION = "9.0.0a"
+SCOVERSION = "9.0.1"
SCONAME = "ScoDoc"
SCONEWS = """
Année 2021
-- Passage à Python 3 et amélioration des performances
+- ScoDoc 9: nouvelle architecture logicielle
- Version mobile (en test)
- Évaluations de type "deuxième session"
- Gestion du genre neutre (pas d'affichage de la civilité)
diff --git a/scodoc.py b/scodoc.py
index e88bf639..45779e4c 100755
--- a/scodoc.py
+++ b/scodoc.py
@@ -209,7 +209,7 @@ def test_interactive(filename=None):
@app.cli.command()
@with_appcontext
def import_scodoc7_users(): # import-scodoc7-users
- """Import used defined in ScoDoc7 postgresql database into ScoDoc8
+ """Import used defined in ScoDoc7 postgresql database into ScoDoc 9
The old database SCOUSERS must be alive and readable by the current user.
This script is typically run as unix user "scodoc".
The original SCOUSERS database is left unmodified.
diff --git a/tools/build_release.sh b/tools/build_release.sh
index d4195202..11f621ae 100644
--- a/tools/build_release.sh
+++ b/tools/build_release.sh
@@ -8,7 +8,7 @@ die() {
PACKAGE_NAME=scodoc9
RELEASE_TAG=9.0.1
-VERSION=9.0.0
+VERSION=9.0.1
RELEASE=1
ARCH="amd64"
FACTORY_DIR="/opt/factory"
diff --git a/tools/debian/postinst b/tools/debian/postinst
index 1c5b7675..6bdf4d6f 100644
--- a/tools/debian/postinst
+++ b/tools/debian/postinst
@@ -85,6 +85,12 @@ fi
# --- Ensure postgres user "scodoc" ($POSTGRES_USER) exists
init_postgres_user
+# --- MISES A JOUR
+cp "$SCODOC_DIR"/tools/etc/scodoc-updater.service /etc/systemd/system
+cp "$SCODOC_DIR"/tools/etc/scodoc-updater.timer /etc/systemd/system
+systemctl enable scodoc-updater.timer
+systemctl start scodoc-updater.timer
+
# --- SYSTEMD: on a (peut-être) installé un fichier de service
systemctl daemon-reload
systemctl enable scodoc9
diff --git a/tools/upgrade.sh b/tools/upgrade.sh
old mode 100644
new mode 100755
index 34d62818..02db2b12
--- a/tools/upgrade.sh
+++ b/tools/upgrade.sh
@@ -1,18 +1,16 @@
#!/bin/bash
-# Upgrade ScoDoc installation using GIT
-# GIT must be properly configured and have read access to ScoDoc repository
+# Upgrade ScoDoc installation using APT
+#
# This script STOP and RESTART ScoDoc and should be runned as root
#
# Upgrade also the Linux system using apt.
#
-# Script for ScoDoc 8 (10)
+# Script for ScoDoc 9
#
-# E. Viennet, sep 2013, mar 2017, jun 2019, aug 2020, dec 2020
+# E. Viennet, sep 2013, mar 2017, jun 2019, aug 2020, dec 2020, aug 21
-A REVOIR : utiliser releases
-
# Le répertoire de ce script:
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
@@ -28,113 +26,6 @@ if [ -z "$SCODOC_UPGRADE_RUNNING" ]
then
apt-get update && apt-get -y dist-upgrade
fi
-
-
-scodocctl stop
-
-echo
-echo "Using git to update $SCODOC_DIR..."
-(cd "$SCODOC_DIR"; git checkout ScoDoc8; git pull origin master)
-
-SVNVERSION=$(cd ..; svnversion)
-
-if [ ! -e "${SCODOC_VERSION_DIR}" ]; then
- mkdir -p "${SCODOC_VERSION_DIR}"
- chown "$SCODOC_USER"."$SCODOC_GROUP" "${SCODOC_VERSION_DIR}"
-fi
-if [ ! -e "${SCODOC_VERSION_DIR}"/scodoc.sn ]; then
- if [ -e "$SCODOC_DIR"/config/scodoc.sn ]; then
- # migrate from old scodoc installs
- mv "$SCODOC_DIR"/config/scodoc.sn "${SCODOC_VERSION_DIR}"
- fi
-fi
-
-SN=$(cat "$SCODOC_DIR"/config/scodoc.sn 2> /dev/null || cat "${SCODOC_VERSION_DIR}"/scodoc.sn)
-if [ -e "$SCODOC_DIR"/config/scodoc.sn ] || [ -e "${SCODOC_VERSION_DIR}"/scodoc.sn ]
-then
- if [[ ! "${SN}" =~ ^[0-9].* ]]
- then
- SN='' # fix for invalid previous replies
- fi
- mode=upgrade
-else
- mode=install
-fi
-
-CMD="curl --fail --connect-timeout 5 --silent http://scodoc.iutv.univ-paris13.fr/scodoc-installmgr/version?mode=$mode\&svn=${SVNVERSION}\&sn=${SN}"
-#echo $CMD
-SVERSION="$(${CMD})"
-
-if [ "$?" == 0 ]; then
- #echo "answer=${SVERSION}"
- echo "${SVERSION}" > "${SCODOC_VERSION_DIR}"/scodoc.sn
-else
- echo 'Warning: cannot connect to scodoc release server'
-fi
-
-
-# Check that no Zope "access" file has been forgotten in the way:
-if [ -e "$SCODOC_DIR"/../../access ]
-then
- mv "$SCODOC_DIR"/../../access "$SCODOC_DIR"/../../access.bak
-fi
-
-# Fix some permissions which may have been altered in the way:
-chown -R "$SCODOC_USER"."$SCODOC_GROUP" "${SCODOC_DIR}"
-chmod -R 775 "${SCODOC_DIR}"
-
-# depts dir:
-if [ ! -e "${SCODOC_VAR_DIR}/config/depts" ]
-then
- mkdir "${SCODOC_VAR_DIR}/config/depts"
-fi
-
-# Se recharge car ce fichier peut avoir change durant le svn up !
-if [ -z "$SCODOC_UPGRADE_RUNNING" ]
-then
- export SCODOC_UPGRADE_RUNNING=1
- ./upgrade.sh
- exit 0
-fi
-
-# Add some python modules:
-"$SCODOC_DIR"/config/install_cal_modules.sh
-/opt/zope213/bin/python -c "import requests" >& /dev/null
-if [ $? -ne 0 ]
-then
- /opt/zope213/bin/pip install requests
-fi
-/opt/zope213/bin/python -c "import attrdict" >& /dev/null
-if [ $? -ne 0 ]
-then
- /opt/zope213/bin/pip install attrdict
-fi
-
-# Check that local configuration file is installed
-LOCAL_CONFIG_FILENAME="/opt/scodoc/var/scodoc/config/scodoc_local.py"
-if [ ! -e "$LOCAL_CONFIG_FILENAME" ]
-then
- cp "$SCODOC_DIR"/config/scodoc_config_tmpl.py "$LOCAL_CONFIG_FILENAME"
- chmod 600 "$LOCAL_CONFIG_FILENAME"
-fi
-
-# upgrade old dateutil (check version manually to speedup)
-v=$(/opt/zope213/bin/python -c "import dateutil; print dateutil.__version__")
-[[ "$v" < "2.8.1" ]] && /opt/zope213/bin/pip install --upgrade python-dateutil
-
-# Ensure scodoc can duplicate databases (for dumps)
-su -c $'psql -c \'alter role "scodoc" with CREATEDB;\'' "$POSTGRES_SUPERUSER"
-#'
-
-# post-upgrade scripts
-echo "Executing post-upgrade script..."
-"$SCODOC_DIR"/config/postupgrade.py
-
-echo "Executing post-upgrade database script..."
-su -c "$SCODOC_DIR/config/postupgrade-db.py" "$POSTGRES_USER"
-
-#
-echo
-scodocctl start
-
-
+systemctl restart redis
+systemctl restart nginx
+systemctl restart scodoc9