From e225197e1593802b54dc607b882ff114b34239f5 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 13 Sep 2021 10:00:07 +0200 Subject: [PATCH] ameliore install nginx/scodoc9 --- tools/build_release.sh | 6 +----- tools/debian/postinst | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/build_release.sh b/tools/build_release.sh index bd7dca38..a3645b63 100644 --- a/tools/build_release.sh +++ b/tools/build_release.sh @@ -92,11 +92,7 @@ fi # nginx: mkdir -p "$slash"/etc/nginx/sites-available || die "can't mkdir nginx config" cp -p "$SCODOC_DIR"/tools/etc/scodoc9.nginx "$slash"/etc/nginx/sites-available/scodoc9.nginx.distrib || die "can't copy nginx config" -# Evite d'écraser: il faudrait ici présenter un dialogue "fichier local modifié, ..." -if [ ! -e "$slash"/etc/nginx/sites-available/scodoc9.nginx ] -then - cp -p "$SCODOC_DIR"/tools/etc/scodoc9.nginx "$slash"/etc/nginx/sites-available/ || die "can't copy nginx config" -fi + # systemd mkdir -p "$slash"/etc/systemd/system/ || die "can't mkdir systemd config" cp -p "$SCODOC_DIR"/tools/etc/scodoc9.service "$slash"/etc/systemd/system/ || die "can't copy scodoc9.service" diff --git a/tools/debian/postinst b/tools/debian/postinst index 412c298a..3332779f 100755 --- a/tools/debian/postinst +++ b/tools/debian/postinst @@ -80,6 +80,11 @@ su -c "(cd $SCODOC_DIR && python3 -m venv venv)" "$SCODOC_USER" || die "Error cr su -c "(cd $SCODOC_DIR && source venv/bin/activate && pip install wheel && pip install -r requirements-3.9.txt)" "$SCODOC_USER" || die "Error installing python packages" # --- NGINX +# Evite d'écraser: il faudrait ici présenter un dialogue "fichier local modifié, ..." +if [ ! -e /etc/nginx/sites-available/scodoc9.nginx ] +then + cp -p /etc/nginx/sites-available/scodoc9.nginx.distrib /etc/nginx/sites-available/scodoc9.nginx || die "can't copy nginx config" +fi if [ ! -L /etc/nginx/sites-enabled/scodoc9.nginx ] then echo "Enabling scodoc9 in nginx"