ScoDoc/tools/upgrade.sh

36 lines
1003 B
Bash
Raw 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.
#
# Script for ScoDoc 9. Lancé automatiquement par scodoc-updater.
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
set -euo pipefail
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; }
export DEBIAN_FRONTEND=noninteractive
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
2024-08-25 02:33:16 +02:00
apt-get update && apt-get -y dist-upgrade || alarm_admin "apt-get dist-upgrade failed"
# 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 || alarm_admin "apt install scodoc9 failed"
2021-08-25 23:51:07 +02:00
systemctl restart redis
systemctl restart nginx
systemctl restart scodoc9