2021-09-06 21:32:56 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Déinstallation de scodoc
|
|
|
|
# Ne touche pas aux données (/opt/scodoc-data)
|
|
|
|
# N'enlève complètement /opt/scodoc qui si --purge
|
|
|
|
|
2021-09-19 20:44:26 +02:00
|
|
|
systemctl stop scodoc9 || echo "scodoc9 non lancé"
|
|
|
|
systemctl disable scodoc9 || echo "scodoc9 systemd non configuré"
|
2021-09-06 21:32:56 +02:00
|
|
|
|
|
|
|
if [ "$#" == 1 ] && [ "$1" == "purge" ]
|
|
|
|
then
|
|
|
|
/bin/rm -rf /opt/scodoc
|
2021-09-19 20:44:26 +02:00
|
|
|
/bin/rm -f /etc/systemd/system/scodoc9.service
|
2021-09-06 21:32:56 +02:00
|
|
|
/bin/rm -f /etc/systemd/system/scodoc-updater.service
|
|
|
|
/bin/rm -f /etc/systemd/system/scodoc-updater.timer
|
|
|
|
/bin/rm -f /etc/nginx/sites-enabled/scodoc9.nginx
|
2021-09-19 20:44:26 +02:00
|
|
|
systemctl daemon-reload
|
2021-09-06 21:32:56 +02:00
|
|
|
fi
|
|
|
|
|
2021-09-19 20:44:26 +02:00
|
|
|
systemctl reload nginx || echo 'nginx non fonctionnel'
|
|
|
|
|