MonScoDocEssai/tools/debian/postrm

20 lines
494 B
Plaintext
Raw Permalink Normal View History

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
systemctl stop scodoc9
systemctl disable scodoc9
if [ "$#" == 1 ] && [ "$1" == "purge" ]
then
/bin/rm -rf /opt/scodoc
/bin/rm -f scodoc9.service
/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
fi
systemctl reload nginx