#!/bin/bash

# sudo mkdir -p /etc/sdt/device.config
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 cp device-control /usr/local/bin/
sudo cp device-control.service /etc/systemd/system/
sudo systemctl start device-control
sudo systemctl enable device-control