ameliore install nginx/scodoc9

This commit is contained in:
Emmanuel Viennet 2021-09-13 10:00:07 +02:00
parent 3527d2bba1
commit e225197e15
2 changed files with 6 additions and 5 deletions

View File

@ -92,11 +92,7 @@ fi
# nginx: # nginx:
mkdir -p "$slash"/etc/nginx/sites-available || die "can't mkdir nginx config" 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" 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 # systemd
mkdir -p "$slash"/etc/systemd/system/ || die "can't mkdir systemd config" 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" cp -p "$SCODOC_DIR"/tools/etc/scodoc9.service "$slash"/etc/systemd/system/ || die "can't copy scodoc9.service"

View File

@ -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" 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 # --- 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 ] if [ ! -L /etc/nginx/sites-enabled/scodoc9.nginx ]
then then
echo "Enabling scodoc9 in nginx" echo "Enabling scodoc9 in nginx"