bwc-installer-arm32/init.sh

45 lines
1.2 KiB
Bash
Raw Permalink Normal View History

2023-09-06 05:27:32 +00:00
#!/bin/bash
set -e
if [ $(id -u) -ne 0 ]; then
echo "Please run as root. - sudo su"
exit
elif [ $1 == "help" ]; then
echo "Please input parameter. follow as:"
echo "Example) Organzation ID=58a311aa-f52a-40e3-af44-cdec82b9d0b7 SerialNumbe=ECN-SJ-TEST-001 Type=ecn"
exit
fi
2023-09-06 07:16:57 +00:00
mkdir -p /usr/local/bin
2023-09-06 05:27:32 +00:00
echo "If you need help, please enter follow as:"
echo "./init.sh help"
read -p "Organzation ID(58a311aa-f52a-40e3-af44-cdec82b9d0b7): " oid
read -p "Serial Number(ECN-SJ-TEST-001): " acode
read -p "Type(ecn or nodeq): " etype
echo "[INIT] [1] Start equipment registration"
./bwc-init -oid=$oid -acode=$acode
echo "[INIT] [1] Finish equipment registration"
echo "[INIT] [2] Start install device-control"
cd device-control
./install.sh $acode $etype
2023-09-25 01:39:33 +00:00
mkdir -p /usr/local/sdt/app
2023-09-06 05:27:32 +00:00
echo "[INIT] [2] Finish install device-control"
echo "[INIT] [3] Start install device-health"
cd ../device-health
./install.sh $acode
echo "[INIT] [3] Finish install device-health"
echo "[INIT] [4] Start install device-heartbeat"
cd ../heartbeat
./install.sh
echo "[INIT] [4] Finish install device-heartbeat"
echo "[INIT] [5] Start install process-checker"
cd ../process-checker
./install.sh
2023-09-06 07:16:57 +00:00
echo "[INIT] [5] Stop install process-checker"