Compare commits
No commits in common. "main" and "v0.0.7" have entirely different histories.
Binary file not shown.
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description=When change project code, it manage blokwork clients.
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/bwc-management -mqtt=aws
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo cp bwc-management /usr/bin/
|
||||
sudo cp bwc-management.service /etc/systemd/system/
|
||||
sudo systemctl start bwc-management
|
||||
sudo systemctl enable bwc-management
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"assetcode": "acode",
|
||||
"devicetype": "typecode",
|
||||
"mqtturl": "tcp://43.200.53.170:32259",
|
||||
"projectcode": "no_project",
|
||||
"reboot": "",
|
||||
"requestid": ""
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
assetcode: acode
|
||||
devicetype: typecode
|
||||
mqtturl: tcp://13.209.39.139:32259
|
Binary file not shown.
|
@ -1,8 +1,8 @@
|
|||
[Unit]
|
||||
Description=It control device. There are device's bash, systemd, app's management, json edit.
|
||||
Description=device-control
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/device-control -mqtt=aws
|
||||
ExecStart=/usr/bin/device-control
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# sudo mkdir -p /etc/sdt/device-control
|
||||
sudo cp config.json /etc/sdt/device.config/config.json
|
||||
sudo sed -i "s/acode/$1/g" /etc/sdt/device.config/config.json
|
||||
sudo sed -i "s/typecode/$2/g" /etc/sdt/device.config/config.json
|
||||
sudo mkdir -p /etc/sdt/device-control
|
||||
sudo cp config.yaml /etc/sdt/device-control
|
||||
sudo sed -i "s/acode/$1/g" /etc/sdt/device-control/config.yaml
|
||||
sudo sed -i "s/typecode/$2/g" /etc/sdt/device-control/config.yaml
|
||||
sudo cp device-control /usr/bin/
|
||||
sudo cp device-control.service /etc/systemd/system/
|
||||
sudo systemctl start device-control
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
assetcode: acode
|
||||
mqtturl: tcp://13.209.39.139:32259
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
[Unit]
|
||||
Description=It get device's health. There is cpu, memory, network up/downlink, network interface, etc.
|
||||
Description=DeviceHealth
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
ExecStart=/usr/bin/device-health -mqtt=aws
|
||||
ExecStart=/usr/bin/device-health
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo mkdir -p /etc/sdt/device-health
|
||||
sudo cp config.yaml /etc/sdt/device-health/
|
||||
sudo sed -i "s/acode/$1/g" /etc/sdt/device-health/config.yaml
|
||||
sudo cp device-health /usr/bin/
|
||||
sudo cp device-health.service /etc/systemd/system/
|
||||
sudo systemctl start device-health
|
||||
|
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
[Unit]
|
||||
Description=It send heatbeat to BlokWorks.
|
||||
Description=DeviceHearthBeat
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
ExecStart=/usr/bin/device-heartbeat -mqtt=aws
|
||||
ExecStart=/usr/bin/device-heartbeat
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
|
|
17
init.sh
17
init.sh
|
@ -5,11 +5,10 @@ set -e
|
|||
if [ $(id -u) -ne 0 ]; then
|
||||
echo "Please run as root. - sudo su"
|
||||
exit
|
||||
else
|
||||
elif [ $1 == "help" ]; then
|
||||
echo "Please input parameter. follow as:"
|
||||
echo "Organzation ID=58a311aa-f52a-40e3-af44-cdec82b9d0b7"
|
||||
echo "SerialNumber=ECN-SJ-TEST-001"
|
||||
echo "Type=ecn"
|
||||
echo "Example) Organzation ID=58a311aa-f52a-40e3-af44-cdec82b9d0b7 SerialNumbe=ECN-SJ-TEST-001 Type=ecn"
|
||||
exit
|
||||
fi
|
||||
|
||||
mkdir -p /usr/local/bin
|
||||
|
@ -19,11 +18,6 @@ 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] [0] Init equipment registration"
|
||||
mkdir -p /etc/sdt/device.config
|
||||
mkdir -p /etc/sdt/device.logs
|
||||
echo "[INIT] [0] Finish init equipment registration"
|
||||
|
||||
echo "[INIT] [1] Start equipment registration"
|
||||
./bwc-init -oid=$oid -acode=$acode
|
||||
echo "[INIT] [1] Finish equipment registration"
|
||||
|
@ -48,8 +42,3 @@ echo "[INIT] [5] Start install process-checker"
|
|||
cd ../process-checker
|
||||
./install.sh
|
||||
echo "[INIT] [5] Stop install process-checker"
|
||||
|
||||
echo "[INIT] [6] Start install bwc-management"
|
||||
cd ../bwc-management
|
||||
./install.sh
|
||||
echo "[INIT] [6] Stop install bwc-management"
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
[Unit]
|
||||
Description=It get app's health. There is cpu, memory, app's PID, app's status.
|
||||
Description=processchecker
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
ExecStart=/usr/bin/process-checker -mqtt=aws
|
||||
ExecStart=/usr/bin/process-checker
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
|
|
11
uninstall.sh
11
uninstall.sh
|
@ -37,12 +37,5 @@ rm /etc/systemd/system/process-checker.service
|
|||
rm /usr/bin/process-checker
|
||||
echo "[INIT] Finish uninstall process-checker"
|
||||
|
||||
echo "[INIT] Start uninstall bwc-management"
|
||||
systemctl disable bwc-management
|
||||
systemctl stop bwc-management
|
||||
rm /etc/systemd/system/bwc-management.service
|
||||
rm /usr/bin/bwc-management
|
||||
echo "[INIT] Finish uninstall bwc-management"
|
||||
|
||||
echo "[INIT] Delete Cert, Config, Log Data"
|
||||
rm -rf /etc/sdt
|
||||
echo "[INIT] Delete Cert Data"
|
||||
rm -rf /etc/sdt/cert
|
Loading…
Reference in New Issue