xiaoai-patch icon indicating copy to clipboard operation
xiaoai-patch copied to clipboard

monitor.sh install is broken

Open hillbicks opened this issue 2 years ago • 6 comments

While going through the packages, I saw that you already build monitor.sh as one of the packages. Unfortunately, this script currently doesn't work.

  1. The symlinks for /usr/bin/monitor.sh /usr/share/monitor.sh both point to /usr/share/monitor/monitor.sh, but the actual script resides in /usr/share/monitor.sh/monitor.sh. The directory is missing the .sh

I would have created a pull request for this, but even with this fix, this script needs a lot of overhaul to work. A lot of binaries missing, invalid options, errors due to ro FS

Couple of things that are obvious and can be removed immediately, but it wouldn't be compatible with upstream anymore. (not without major checks at least). I'll have a look over the weekeend and see if I make some dirty changes to get it running on my box at least, no promises though.

/usr/share/monitor.sh/monitor.sh: line 49: git: command not found
/usr/share/monitor.sh/monitor.sh: line 64: ./support/argv: No such file or directory
/usr/share/monitor.sh/monitor.sh: line 65: ./support/init: No such file or directory
/usr/share/monitor.sh/monitor.sh: line 68: ./support/mqtt: No such file or directory
/usr/share/monitor.sh/monitor.sh: line 69: ./support/log: No such file or directory
/usr/share/monitor.sh/monitor.sh: line 70: ./support/data: No such file or directory
/usr/share/monitor.sh/monitor.sh: line 71: ./support/btle: No such file or directory
/usr/share/monitor.sh/monitor.sh: line 72: ./support/time: No such file or directory
pidof: invalid option -- 'x'
BusyBox v1.32.1 (2021-07-20 11:36:17 CEST) multi-call binary.

Usage: pidof [OPTIONS] [NAME]...

List PIDs of all processes with names that match NAMEs

        -s      Show only one PID
        -o PID  Omit given pid
                Use %PPID to omit pid of pidof's parent
mkfifo: main_pipe: Read-only file system
mkfifo: log_pipe: Read-only file system
mkfifo: packet_pipe: Read-only file system
/usr/share/monitor.sh/monitor.sh: line 150: /dev/fd/63: No such file or directory
/usr/share/monitor.sh/monitor.sh: line 151: /dev/fd/63: No such file or directory
/usr/share/monitor.sh/monitor.sh: line 150: : No such file or directory
/usr/share/monitor.sh/monitor.sh: line 152: /dev/fd/63: No such file or directory
/usr/share/monitor.sh/monitor.sh: line 151: : No such file or directory
/usr/share/monitor.sh/monitor.sh: line 152: : No such file or directory
rm: can't remove '.pids': No such file or directory
/usr/share/monitor.sh/monitor.sh: line 821: log_listener: command not found
/usr/share/monitor.sh/monitor.sh: line 823: .pids: Read-only file system
> log listener pid = 2001
/usr/share/monitor.sh/monitor.sh: line 827: btle_scanner: command not found
/usr/share/monitor.sh/monitor.sh: line 829: .pids: Read-only file system
> btle scan pid = 2002
/usr/share/monitor.sh/monitor.sh: line 833: btle_text_listener: command not found
/usr/share/monitor.sh/monitor.sh: line 835: .pids: Read-only file system
> btle text pid = 2003
/usr/share/monitor.sh/monitor.sh: line 839: btle_listener: command not found
/usr/share/monitor.sh/monitor.sh: line 841: .pids: Read-only file system
> btle listener pid = 2004
/usr/share/monitor.sh/monitor.sh: line 847: .pids: Read-only file system
/usr/share/monitor.sh/monitor.sh: line 845: mqtt_listener: command not found
> mqtt listener pid = 2005
/usr/share/monitor.sh/monitor.sh: line 853: .pids: Read-only file system
/usr/share/monitor.sh/monitor.sh: line 851: btle_packet_listener: command not found
> packet listener pid = 2006
/usr/share/monitor.sh/monitor.sh: line 859: .pids: Read-only file system
/usr/share/monitor.sh/monitor.sh: line 857: beacon_database_expiration_trigger: command not found
> beacon database time trigger pid = 2007
/usr/share/monitor.sh/monitor.sh: line 1990: main_pipe: No such file or directory
/usr/share/monitor.sh/monitor.sh: line 1987: [: : integer expression expected

hillbicks avatar Jul 23 '21 07:07 hillbicks