16636: add 'containers_longest_wait_time_seconds' metric: a gauge that
[arvados.git] / build / rails-package-scripts / postrm.sh
1 #!/bin/sh
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 # This code runs after package variable definitions and step2.sh.
7
8 set -e
9
10 purge () {
11   rm -rf $SHARED_PATH/vendor_bundle
12   rm -rf $SHARED_PATH/log
13   rm -rf $CONFIG_PATH
14   rmdir $SHARED_PATH || true
15   rmdir $INSTALL_PATH || true
16 }
17
18 if [ "$1" = 'purge' ]; then
19   # This is a debian-based system and purge was requested
20   purge
21 elif [ "$1" = "0" ]; then
22   # This is an rpm-based system, no guarantees are made, always purge
23   # Apparently yum doesn't actually remember what it installed.
24   # Clean those files up here, then purge.
25   rm -rf $RELEASE_PATH
26   purge
27 fi