1
0
forked from ScoDoc/ScoDoc

Debian desinstall (purge) script

This commit is contained in:
Emmanuel Viennet 2021-09-06 21:32:56 +02:00
parent 0bc8138c72
commit ee0961d247

19
tools/debian/postrm Executable file
View File

@ -0,0 +1,19 @@
#!/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