File: swift-container.prerm

package info (click to toggle)
swift 2.19.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,768 kB
  • sloc: python: 197,574; sh: 636; pascal: 253; makefile: 69; xml: 32
file content (23 lines) | stat: -rwxr-xr-x 756 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -e

if [ "$1" = "upgrade" ] ; then
    # If downgrading to version older than 2.6.0-2 stop service first. In this
    # version init scripts was rewritten and swift-init support was dropped
    if dpkg --compare-versions "$2" lt "2.6.0-2" ; then
        echo "Downgrading to < 2.6.0-2, need to stop services first"

        invoke-rc.d swift-container stop || true
        invoke-rc.d swift-container-auditor stop || true
        invoke-rc.d swift-container-reconciler stop || true
        invoke-rc.d swift-container-replicator stop || true
        invoke-rc.d swift-container-sharder stop || true
        invoke-rc.d swift-container-sync stop || true
        invoke-rc.d swift-container-updater stop || true
    fi
fi

#DEBHELPER#

exit 0