summarylogtreecommitdiffstats
path: root/easyconnect.sh
blob: dc8830196f9e2f79bee0edb2a05cab2225d2f3d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
set -e
_APPDIR=/usr/share/@appname@/@runpath@
_RUNNAME="${_APPDIR}/@runname@"
export PATH="${_APPDIR}:${PATH}"
export LD_LIBRARY_PATH="${_APPDIR}/lib:${_APPDIR}/resources/lib64:${LD_LIBRARY_PATH}"
export ELECTRON_IS_DEV=0
export NODE_ENV=production
cd "${_APPDIR}"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
    exec "${_RUNNAME}" "$@" || exit $?
else   
    exec "${_RUNNAME}" --no-sandbox "$@" || exit $?
fi