mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
add detection of xwindows running
This commit is contained in:
parent
0677d0a810
commit
c8849a17b6
10
run-start.sh
10
run-start.sh
@ -11,14 +11,18 @@ arch=$(uname -m)
|
|||||||
serveronly=$(grep -i serveronly: config/config.js | awk '{print tolower($2)}' | tr -d ,\"\')
|
serveronly=$(grep -i serveronly: config/config.js | awk '{print tolower($2)}' | tr -d ,\"\')
|
||||||
# set default if not defined in config
|
# set default if not defined in config
|
||||||
serveronly="${serveronly:=false}"
|
serveronly="${serveronly:=false}"
|
||||||
|
# check for xwindows running
|
||||||
|
xorg=$(pgrep Xorg)
|
||||||
#
|
#
|
||||||
# if the user requested serveronly OR
|
# if the user requested serveronly OR
|
||||||
# electron support for armv6l has been dropped
|
# electron support for armv6l has been dropped OR
|
||||||
|
# system is in text mode
|
||||||
#
|
#
|
||||||
if [ "$serveronly." != "false." -o "$arch" == "armv6l" ]; then
|
if [ "$serveronly." != "false." -o "$arch" == "armv6l" -o "$xorg." == "." ]; then
|
||||||
|
|
||||||
# if user explicitly configured to run server only (no ui local)
|
# if user explicitly configured to run server only (no ui local)
|
||||||
if [ "$serveronly." == "true." ]; then
|
# OR there is no xwindows running, so no support for browser graphics
|
||||||
|
if [ "$serveronly." == "true." -o "$xorg." == "." ]; then
|
||||||
# start server mode,
|
# start server mode,
|
||||||
node serveronly
|
node serveronly
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user