summarylogtreecommitdiffstats
path: root/supalive.sh
diff options
context:
space:
mode:
Diffstat (limited to 'supalive.sh')
-rw-r--r--supalive.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/supalive.sh b/supalive.sh
index 7856795f29a3..c77c53567639 100644
--- a/supalive.sh
+++ b/supalive.sh
@@ -1,10 +1,17 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron27
-APPDIR="/usr/lib/supalive"
-export PATH="${APPDIR}:${PATH}"
-_ASAR="${APPDIR}/app.asar"
+#!/bin/sh
+set -e
+_APPDIR="/usr/lib/@appname@"
+_ASAR="${_APPDIR}/@appasar@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export ELECTRON_IS_DEV=0
+export NODE_ENV=production
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec ${_ELECTRON} ${_ASAR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
+ exit
else
- exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
+ exit
fi \ No newline at end of file