bwc-installer/init.sh

44 lines
1.2 KiB
Bash
Raw Normal View History

2023-09-11 01:56:25 +00:00
#!/bin/bash
set -e
if [ $(id -u) -ne 0 ]; then
echo "Please run as root. - sudo su"
exit
2023-11-07 07:05:06 +00:00
else
2023-09-11 01:56:25 +00:00
echo "Please input parameter. follow as:"
2023-11-07 07:05:06 +00:00
echo "Organzation ID=58a311aa-f52a-40e3-af44-cdec82b9d0b7"
echo "SerialNumber=ECN-SJ-TEST-001"
echo "Type=ecn"
2023-09-11 01:56:25 +00:00
fi
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:13 +00:00
mkdir -p /usr/local/sdt/app
2023-09-11 01:56:25 +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
echo "[INIT] [5] Stop install process-checker"