30 lines
924 B
Bash
30 lines
924 B
Bash
#!/bin/bash
|
|
#*************cap quyen****************************
|
|
sudo chmod +x /root/monitor/launcher/S905X_BI
|
|
sudo chmod +x /root/monitor/check/Check_engine
|
|
sudo chmod +x /root/monitor/check/run_check.sh
|
|
sudo chmod +x /root/monitor/ssh/open_ssh.sh
|
|
sudo chmod +x /root/monitor/cache/clearcache.sh
|
|
sudo chmod +x /root/monitor/CMS/install.sh run_cms.sh
|
|
sudo chmod +x /root/monitor/setup/run_CMS.sh install_S905X_BI.sh
|
|
sudo chmod +x /root/monitor/setup/install_box/install_box.sh env.sh
|
|
#*************setup service S905X_BI***************
|
|
cd /etc/systemd/system/
|
|
echo "[Unit]
|
|
Description=S905X_BI demo service
|
|
After=network.target
|
|
StartLimitIntervalSec=0
|
|
[Service]
|
|
Type=simple
|
|
Restart=always
|
|
RestartSec=1
|
|
User=root
|
|
ExecStart=/usr/bin/env /root/monitor/launcher/S905X_BI
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target" > S905X_BI.service
|
|
sudo chmod 755 S905X_BI.service
|
|
sudo systemctl start S905X_BI
|
|
sudo systemctl enable S905X_BI
|
|
exit 0
|