mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-01 13:33:15 +00:00
add support for commented lines in config.js
This commit is contained in:
parent
985698bbc3
commit
caaeff5cb7
14
run-start.sh
14
run-start.sh
@ -7,20 +7,20 @@ if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty
|
||||
fi
|
||||
# get the processor architecture
|
||||
arch=$(uname -m)
|
||||
# got the config option, if any
|
||||
serveronly=$(grep -i serveronly: config/config.js | awk '{print tolower($2)}' | tr -d ,\"\')
|
||||
false='false'
|
||||
# get the config option, if any
|
||||
# only check non comment lines
|
||||
serveronly=$(grep -v '^\s//' config/config.js | grep -i serveronly: | awk '{print tolower($2)}' | tr -d ,\"\')
|
||||
# set default if not defined in config
|
||||
serveronly="${serveronly:=false}"
|
||||
serveronly=${serveronly:-false}
|
||||
# check for xwindows running
|
||||
xorg=$(pgrep Xorg)
|
||||
#check for macOS
|
||||
mac=$(uname)
|
||||
#
|
||||
# if the user requested serveronly OR
|
||||
# electron support for armv6l has been dropped OR
|
||||
# system is in text mode
|
||||
#
|
||||
if [ "$serveronly." != "false." -o "$arch" == "armv6l" ] || [ "$xorg." == "." -a $mac != 'Darwin' ]; then
|
||||
if [ "$serveronly." != "false." -o "$arch" == "armv6l" -o "$xorg." == "." ]; then
|
||||
|
||||
# if user explicitly configured to run server only (no ui local)
|
||||
# OR there is no xwindows running, so no support for browser graphics
|
||||
@ -60,5 +60,5 @@ if [ "$serveronly." != "false." -o "$arch" == "armv6l" ] || [ "$xorg." == "."
|
||||
fi
|
||||
else
|
||||
# we can use electron directly
|
||||
`electron js/electron.js $1`;
|
||||
electron js/electron.js $1;
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user