2020-12-05 17:29:26 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-12-06 15:28:49 +01:00
|
|
|
# Modify ScoDoc install to use systemd
|
2020-12-05 17:29:26 +01:00
|
|
|
# E. Viennet, 2020-12-04
|
|
|
|
source config.sh
|
|
|
|
source utils.sh
|
|
|
|
|
|
|
|
check_uid_root $0
|
|
|
|
|
|
|
|
echo 'Installation du demarrage automatique de ScoDoc (systemd)'
|
2021-05-28 22:24:37 +02:00
|
|
|
|
|
|
|
# La variable POSTGRES_SERVICE doit être positionnée dans config.sh
|
|
|
|
# suivant la version de Debian et de postgresql
|
|
|
|
[ -z "${POSTGRES_SERVICE}" ] && die "incompatible Debian version"
|
|
|
|
|
|
|
|
cat "$SCODOC_DIR/config/etc/scodoc.service" | sed 's/{{postgresql}}/'"${POSTGRES_SERVICE}"'/g' > /etc/systemd/system/scodoc.service
|
|
|
|
|
2020-12-05 17:29:26 +01:00
|
|
|
systemctl enable scodoc.service
|
|
|
|
|
|
|
|
echo "A partir de maintenant, utiliser"
|
|
|
|
echo " pour demarrer: systemctl start scodoc"
|
|
|
|
echo " pour arreter : systemctl stop scodoc"
|
|
|
|
|