File: postrm

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 (32 lines) | stat: -rwxr-xr-x 639 bytes parent folder | download | duplicates (2)
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
28
29
30
31
32
#!/bin/sh
set -e

purge_files()
{
    for i in $(ls /home)
    do
        path=/home/$i/.config/
        if [ -h $path/autostart/opensnitch_ui.desktop -o -f $path/autostart/opensnitch_ui.desktop ];then
            rm -f $path/autostart/opensnitch_ui.desktop
        fi
        if [ -d $path/opensnitch/ ]; then
            rm -rf $path/opensnitch/
        fi
    done

    deskfile=/etc/xdg/autostart/opensnitch_ui.desktop
    if [ -h $deskfile -o -f $deskfile ]; then
        rm -f $deskfile
    fi
}

pkill -15 opensnitch-ui || true

case "$1" in
    purge)
        purge_files
        ;;
    remove)
        purge_files
        ;;
esac