Check if monitor.conf exists before sourcing to prevent errors
This commit is contained in:
+2
-1
@@ -141,7 +141,8 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
import_config() {
|
import_config() {
|
||||||
if source "$CONFIG_FILE"; then
|
if [[ -f "$CONFIG_FILE" ]]; then
|
||||||
|
source $CONFIG_FILE
|
||||||
if [[ $MONITOR == "" ]] || [[ $NATIVE_RES == "" ]] || [[ $TEMP_RES == "" ]]; then
|
if [[ $MONITOR == "" ]] || [[ $NATIVE_RES == "" ]] || [[ $TEMP_RES == "" ]]; then
|
||||||
echo "Error: monitor.conf has not been configured."
|
echo "Error: monitor.conf has not been configured."
|
||||||
exit -2
|
exit -2
|
||||||
|
|||||||
Reference in New Issue
Block a user