yi-hack-v5
yi-hack-v5 copied to clipboard
get_config shall not be used before the function is defined.
Hi,
The get_config function in wd_rtsp.sh should be moved to the beginning of the script, it should not be referenced (in line 15/16) before it's defined:
/home/yi-hack-v5 # sh -x ./script/wd_rtsp.sh + CONF_FILE=etc/system.conf + YI_HACK_PREFIX=/tmp/sd/yi-hack-v5 + cat /home/app/.camver + MODEL_SUFFIX=yi_outdoor + LOG_FILE=/tmp/sd/wd_rtsp.log + COUNTER=0 + COUNTER_LIMIT=10 + INTERVAL=10 + get_config RTSP_STREAM ./script/wd_rtsp.sh: line 15: get_config: not found + RRTSP_RES= + get_config RTSP_AUDIO ./script/wd_rtsp.sh: line 16: get_config: not found + RRTSP_AUDIO= ...
https://github.com/alienatedsec/yi-hack-v5/blob/60c5213173bc228e02b7cf3d056733dc6000225b/src/static/static/home/yi-hack-v5/script/wd_rtsp.sh#L22
@ViktorSchlaffer your issue is valid but the problem is that this script is currently disabled: https://github.com/alienatedsec/yi-hack-v5/blame/master/src/static/static/home/yi-hack-v5/script/system.sh#L240 (probably because of that issue).