File: AppRun

package info (click to toggle)
leocad 25.09-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,008 kB
  • sloc: cpp: 51,794; xml: 11,265; python: 81; sh: 52; makefile: 16
file content (26 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download
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
#!/bin/bash -e

HERE="$(dirname "$(readlink -f "${0}")")"

# Find the system certificates location
# https://gitlab.com/probono/platformissues/blob/master/README.md#certificates
possible_locations=(
    "/etc/ssl/certs/ca-certificates.crt"                # Debian/Ubuntu/Gentoo etc.
    "/etc/pki/tls/certs/ca-bundle.crt"                  # Fedora/RHEL
    "/etc/ssl/ca-bundle.pem"                            # OpenSUSE
    "/etc/pki/tls/cacert.pem"                           # OpenELEC
    "/etc/ssl/certs"                                    # SLES10/SLES11, https://golang.org/issue/12139
    "/usr/share/ca-certs/.prebuilt-store/"              # Clear Linux OS; https://github.com/knapsu/plex-media-player-appimage/issues/17#issuecomment-437710032
    "/system/etc/security/cacerts"                      # Android
    "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" # CentOS/RHEL 7
    "/etc/ssl/cert.pem"                                 # Alpine Linux
)

for location in "\${possible_locations[@]}"; do
    if [ -r "\${location}" ]; then
    export SSL_CERT_FILE="\${location}"
    break
    fi
done

exec "${HERE}/usr/bin/leocad" "$@"