summarylogtreecommitdiffstats
path: root/easyconnect.sh
blob: d05b3ad92a522f258790085ccebaf2a60fd2cb1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
set -o pipefail
_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 ELECTRON_FORCE_IS_PACKAGED=true
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