diff options
Diffstat (limited to 'certbox.sh')
-rw-r--r-- | certbox.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/certbox.sh b/certbox.sh index fbfe9a1e60c1..2ec4412e5c4f 100644 --- a/certbox.sh +++ b/certbox.sh @@ -1,8 +1,14 @@ #!/bin/bash -_ELECTRON=/usr/bin/electron26 -_APPDIR="/opt/certbox/resources/app/" +set -e +_APPDIR="/usr/lib/@appname@" +export PATH="${_APPDIR}:${PATH}" +export ELECTRON_IS_DEV=0 +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +_ASAR="${_APPDIR}/@appasar@" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec ${_ELECTRON} ${_APPDIR} "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" "$@" else - exec ${_ELECTRON} ${_APPDIR} --no-sandbox "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" fi
\ No newline at end of file |