source: lliurex-pmb/trunk/fuentes/debian/lliurex-pmb.prerm

Last change on this file was 8142, checked in by jrpelegrina, 2 years ago

Fix prerm script

File size: 688 bytes
Line 
1#!/bin/sh
2
3# prerm code commented
4# pmb configured with lliurex-zero-pmb
5set -e
6opac_file="/etc/apache2-lliurex/sites-enabled/opac.conf"
7pmb_file="/etc/apache2-lliurex/sites-enabled/pmb.conf"
8pmb_timeout_file="/etc/apache2/conf-enabled/pmb.conf"
9
10DISSITE="/usr/local/sbin/a2dissite-lliurex"
11
12case "$1" in
13    remove|purge|abort-install|disappear)
14        if [ -f $opac_file ]; then
15                ${DISSITE} opac || true
16                a2dissite opac || true
17        fi
18
19        if [ -f $pmb_file ]; then
20                ${DISSITE} pmb || true
21                a2dissite pmb || true
22               
23        fi
24       
25        if [ -f $pmb_timeout_file ]; then
26                a2disconf pmb || true
27        fi
28 
29        systemctl restart apache2-lliurex || true
30        systemctl restart apache2 || true
31        ;;
32
33esac
34#DEBHELPER#
35exit 0
Note: See TracBrowser for help on using the repository browser.