View | Details | Raw Unified | Return to bug 9754
Collapse All | Expand All

(-)a/debian/scripts/koha-remove (-3 / +8 lines)
Lines 27-38 else Link Here
27
    exit 1
27
    exit 1
28
fi
28
fi
29
29
30
args=$(getopt -l keep-mysql -o k -n $0 -- "$@")
30
args=$(getopt -l keep-mysql,purge-all -o kp -n $0 -- "$@")
31
eval set -- $args
31
eval set -- $args
32
while [ ! -z "$1" ]
32
while [ ! -z "$1" ]
33
do
33
do
34
    case "$1" in
34
    case "$1" in
35
         -k|--keep-mysql) keepmysql=1; shift;;
35
         -k|--keep-mysql) keepmysql=1;;
36
         -p|--purge-all) purgeall=1;;
37
             # purgeall removes all instance files in var/lib/koha and var/spool/koha
36
         --) shift; break;;
38
         --) shift; break;;
37
          *) break;;
39
          *) break;;
38
    esac
40
    esac
Lines 102-107 eof Link Here
102
        rm -r "/var/log/koha/$name"
104
        rm -r "/var/log/koha/$name"
103
    [ -d "/var/run/koha/$name" ] && \
105
    [ -d "/var/run/koha/$name" ] && \
104
        rm -r "/var/run/koha/$name"
106
        rm -r "/var/run/koha/$name"
107
    [ "$purgeall" = "1" ] && [ -d "/var/lib/koha/$name" ] && \
108
        rm -r "/var/lib/koha/$name"
109
    [ "$purgeall" = "1" ] && [ -d "/var/spool/koha/$name" ] && \
110
        rm -r "/var/spool/koha/$name"
105
    getent passwd "$name-koha" > /dev/null && deluser --quiet "$name-koha"
111
    getent passwd "$name-koha" > /dev/null && deluser --quiet "$name-koha"
106
    # in case the site has already been disabled, we don't want to break the loop now.
112
    # in case the site has already been disabled, we don't want to break the loop now.
107
    a2dissite "$name" > /dev/null 2>&1 || a2dissite "${name}.conf" > /dev/null 2>&1 || /bin/true
113
    a2dissite "$name" > /dev/null 2>&1 || a2dissite "${name}.conf" > /dev/null 2>&1 || /bin/true
108
- 

Return to bug 9754