File: swift-object-expirer.prerm

package info (click to toggle)
swift 2.10.2-1~deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,716 kB
  • ctags: 11,366
  • sloc: python: 143,645; sh: 617; pascal: 243; makefile: 71; xml: 30
file content (17 lines) | stat: -rw-r--r-- 415 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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 service first"

        invoke-rc.d swift-object-expirer stop || true
    fi
fi

#DEBHELPER#

exit 0