summarylogtreecommitdiffstats
path: root/main.install
blob: 079de6519b2c1d6ba2f24ecfbff312181f010dcc (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
post_install() {
    serverDir=/etc/connective-http
    classPathFolders=( "libs/" )
    mainType=org.asf.connective.standalone.main.ConnectiveStandalone
    credtoolLibs=()
    credtoolTarget=""
    jvmArguments="-Djava.net.preferIPv4Stack=true"

    if [ -f "/etc/connective-http/config.props" ]; then
        source "/etc/connective-http/config.props"
    fi

    mkdir "$serverDir/coremodules" -p
    chown connective:connective "$serverDir/coremodules" -R
    ln -sf "/usr/lib/connective-https/ConnectiveHTTPS.jar" "$serverDir/coremodules/ConnectiveHTTPS.jar"
    chown connective "$serverDir/coremodules/ConnectiveHTTPS.jar"
}

post_upgrade() {
    serverDir=/etc/connective-http
    classPathFolders=( "libs/" )
    mainType=org.asf.connective.standalone.main.ConnectiveStandalone
    credtoolLibs=()
    credtoolTarget=""
    jvmArguments="-Djava.net.preferIPv4Stack=true"

    if [ -f "/etc/connective-http/config.props" ]; then
        source "/etc/connective-http/config.props"
    fi
    
    mkdir "$serverDir/coremodules" -p
    chown connective:connective "$serverDir/coremodules" -R
    ln -sf "/usr/lib/connective-https/ConnectiveHTTPS.jar" "$serverDir/coremodules/ConnectiveHTTPS.jar"
    chown connective "$serverDir/coremodules/ConnectiveHTTPS.jar"
}

post_remove() {
    serverDir=/etc/connective-http
    classPathFolders=( "libs/" )
    mainType=org.asf.connective.standalone.main.ConnectiveStandalone
    credtoolLibs=()
    credtoolTarget=""
    jvmArguments="-Djava.net.preferIPv4Stack=true"

    if [ -f "/etc/connective-http/config.props" ]; then
        source "/etc/connective-http/config.props"
    fi

    rm -f "$serverDir/coremodules/ConnectiveHTTPS.jar"
}