File: python3-opensnitch-ui.postinst

package info (click to toggle)
opensnitch 1.6.9-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,980 kB
  • sloc: python: 12,604; ansic: 1,965; sh: 435; makefile: 239; xml: 50; sql: 3
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#