ScoDocMM/tools/upgrade.sh

36 lines
898 B
Bash
Raw Permalink Normal View History

2020-09-26 16:19:37 +02:00
#!/bin/bash
2021-08-25 23:51:07 +02:00
# Upgrade ScoDoc installation using APT
#
2020-09-26 16:19:37 +02:00
# This script STOP and RESTART ScoDoc and should be runned as root
#
# Upgrade also the Linux system using apt.
#
2021-08-25 23:51:07 +02:00
# Script for ScoDoc 9
2020-09-26 16:19:37 +02:00
#
2021-08-25 23:51:07 +02:00
# E. Viennet, sep 2013, mar 2017, jun 2019, aug 2020, dec 2020, aug 21
2020-09-26 16:19:37 +02:00
2021-08-02 10:34:28 +02:00
# Le répertoire de ce script:
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source "$SCRIPT_DIR/config.sh"
source "$SCRIPT_DIR/utils.sh"
cd "$SCODOC_DIR" || { echo "Invalid directory"; exit 1; }
2020-09-26 16:19:37 +02:00
2020-12-19 19:22:22 +01:00
check_uid_root "$0"
2020-09-26 16:19:37 +02:00
if [ -z "$SCODOC_UPGRADE_RUNNING" ]
then
apt-get update && apt-get -y dist-upgrade
# install spécifiquement scodoc9, utile si les dépendances Debian de scodoc9
# ont été changées, ce qui peut provoquer un
# "packages have been kept back"
apt install scodoc9
2020-09-26 16:19:37 +02:00
fi
2021-08-25 23:51:07 +02:00
systemctl restart redis
systemctl restart nginx
systemctl restart scodoc9