File: python3-opensnitch-ui.postinst

package info (click to toggle)
opensnitch 1.5.9-4
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 10,536 kB
  • sloc: ansic: 136,511; python: 6,597; sh: 204; makefile: 167; xml: 50
file content (27 lines) | stat: -rwxr-xr-x 646 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
set -e

autostart_by_default()
{
    deskfile=/etc/xdg/autostart/opensnitch_ui.desktop
    if [ -d /etc/xdg/autostart -a ! -h  $deskfile -a ! -f $deskfile ]; then
        ln -s /usr/share/applications/opensnitch_ui.desktop /etc/xdg/autostart/
    fi
}

if command -v gtk-update-icon-cache >/dev/null && test -f /usr/share/icons/hicolor/index.theme ; then
    gtk-update-icon-cache --quiet /usr/share/icons/hicolor/
fi

case "$1" in
   configure)
    # first install
    if [ -z $2 ]; then
        autostart_by_default
    elif dpkg --compare-versions "$2" le "1.5.7-2"; then
        autostart_by_default
    fi
    ;;
esac

#DEBHELPER#