49 lines
1.2 KiB
Bash
Executable File
49 lines
1.2 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
# Automatically added by dh_python3
|
|
if command -v py3compile >/dev/null 2>&1; then
|
|
py3compile -p language-selector-common
|
|
fi
|
|
if command -v pypy3compile >/dev/null 2>&1; then
|
|
pypy3compile -p language-selector-common || true
|
|
fi
|
|
|
|
# End automatically added section
|
|
# Automatically added by dh_installdeb/13.6ubuntu1
|
|
dpkg-maintscript-helper mv_conffile /etc/fonts/conf.avail/69-language-selector-ar.conf /etc/fonts/conf.avail/56-language-selector-ar.conf 0.210\~ -- "$@"
|
|
# End automatically added section
|
|
|
|
|
|
get_pid() {
|
|
[ -n "$1" ] || return 0
|
|
[ -S /var/run/dbus/system_bus_socket ] || return 0
|
|
|
|
dbus-send --system --dest=org.freedesktop.DBus --print-reply \
|
|
/org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
|
|
string:$1 2>/dev/null | awk '/uint32/ {print $2}'
|
|
}
|
|
|
|
case "$1" in
|
|
configure)
|
|
# stop any old daemon
|
|
pid=$(get_pid com.ubuntu.LanguageSelector) || true
|
|
if [ -n "$pid" ]; then
|
|
kill $pid 2>/dev/null || true
|
|
fi
|
|
|
|
;;
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
|
|
;;
|
|
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|