test3/device-control/install.sh

10 lines
387 B
Bash
Raw Normal View History

2023-09-11 01:56:25 +00:00
#!/bin/bash
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/local/bin/
sudo cp device-control.service /etc/systemd/system/
sudo systemctl start device-control
sudo systemctl enable device-control