summarylogtreecommitdiffstats
path: root/install-actions.sh
blob: 9a89c8aee94153baefc9f2fb7206c2b54a30fbff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
post_install() {
    cd /opt/kmeldb-ui

    chmod 755 ./kenwooddbgen.sh

    # creating __pycache__ folders and adding proper permissions so that Python can generate
    # compiled bytecode running under standard user account
    mkdir ./__pycache__
    chmod 777 ./__pycache__
    mkdir ./kmeldb_cli/kmeldb/__pycache__
    chmod 777 ./kmeldb_cli/kmeldb/__pycache__

    cd -
}

pre_remove() {
    # Some files (generated by postinstall, for example) are left.
    # We need to clean the mess.
    [ -d /opt/kmeldb-ui/__pycache__ ] && rm -r /opt/kmeldb-ui/__pycache__
    [ -d /opt/kmeldb-ui/kmeldb_cli/kmeldb/__pycache__ ] && rm -r /opt/kmeldb-ui/kmeldb_cli/kmeldb/__pycache__
}