File: libapache2-mod-wsgi-py3.postinst

package info (click to toggle)
mod-wsgi 4.6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,772 kB
  • sloc: ansic: 14,783; python: 3,610; makefile: 224; sh: 174
file content (17 lines) | stat: -rw-r--r-- 383 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e

update_symlink() {
    wsgi_py=`readlink /usr/lib/apache2/modules/mod_wsgi.so | sed 's,.*-,,'`
    py3_default=`dpkg -s python3 | grep '^Version' | sed 's,Version: \([^.]*.[^.]*\).*,\1,'`
    if [ ! "${wsgi_py}" = "${py3_default}" ]; then
        ln -sf mod_wsgi.so-${py3_default} /usr/lib/apache2/modules/mod_wsgi.so
    fi
}

update_symlink

#DEBHELPER#

exit 0