From ee0961d247c2d8a061ca2f92e74ac0dd0a272503 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 6 Sep 2021 21:32:56 +0200 Subject: [PATCH] Debian desinstall (purge) script --- tools/debian/postrm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 tools/debian/postrm diff --git a/tools/debian/postrm b/tools/debian/postrm new file mode 100755 index 00000000..a01b1a38 --- /dev/null +++ b/tools/debian/postrm @@ -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