updated
This commit is contained in:
parent
be29316873
commit
f9808e6711
|
@ -1 +0,0 @@
|
||||||
Subproject commit 3e96a1694e731019837496c0718f4634b60d9ff8
|
|
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
...
|
|
|
@ -1 +0,0 @@
|
||||||
Check log_lancher
|
|
|
@ -1 +0,0 @@
|
||||||
Check log_lancher
|
|
|
@ -1,13 +0,0 @@
|
||||||
[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
|
|
8
monitor/setup/capture.sh
Normal file
8
monitor/setup/capture.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
##ssfull script
|
||||||
|
export DISPLAY=:0
|
||||||
|
DATE=$(date +%Y-%m-%d-%H:%M:%S)
|
||||||
|
gnome-screenshot -f /root/monitor/log/capture/Screenshot-$DATE.png
|
||||||
|
sshpass -p '1' scp -P 2122 -o StrictHostKeyChecking=no /root/monitor/log/capture/Screenshot-$DATE.png aibox@gitlab.beetsoft.com.vn:/home/aibox/capture_log
|
||||||
|
echo "capture & copy done!"
|
||||||
|
exit 0
|
Binary file not shown.
|
@ -1,13 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
sudo chmod +x /root/monitor/CMS/run_cms.sh install.sh
|
|
||||||
sudo /root/monitor/CMS/install.sh
|
|
||||||
# ******************Autossh******************
|
|
||||||
#
|
|
||||||
sudo apt-get install -y autossh
|
|
||||||
#
|
|
||||||
echo "sleep 7
|
|
||||||
|
|
||||||
echo "Begin rc.local. Time restart: $time_begin" >> /root/monitor/log/rc_local.log
|
|
||||||
|
|
||||||
sudo /root/monitor/CMS/run_cms.sh" >> /etc/rc.local
|
|
||||||
exit 0
|
|
Binary file not shown.
|
@ -1,4 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#***************DNS****************************
|
||||||
|
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||||
|
sudo apt update && sudo apt upgrade -y
|
||||||
#***************set time****************************
|
#***************set time****************************
|
||||||
echo "Set timezon"
|
echo "Set timezon"
|
||||||
unlink /etc/localtime
|
unlink /etc/localtime
|
||||||
|
@ -6,14 +9,12 @@ ln -s /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime
|
||||||
#*************cap quyen****************************
|
#*************cap quyen****************************
|
||||||
echo "cap quyen"
|
echo "cap quyen"
|
||||||
chown root:root /etc/sudoers
|
chown root:root /etc/sudoers
|
||||||
#export DISPLAY =:0
|
|
||||||
sudo chmod +x /root/monitor/cache/clearcache.sh
|
sudo chmod +x /root/monitor/cache/clearcache.sh
|
||||||
sudo chmod +x /root/monitor/cache/restart_service.sh
|
sudo chmod +x /root/monitor/cache/restart_service.sh
|
||||||
sudo chmod +x /root/monitor/check/Check_engine
|
sudo chmod +x /root/monitor/check/Check_engine
|
||||||
sudo chmod +x /root/monitor/launcher/S905X_BI
|
sudo chmod +x /root/monitor/launcher/S905X_BI
|
||||||
sudo chmod +x /root/monitor/CMS/install.sh
|
|
||||||
#sudo chmod +x /root/monitor/setup/serverUART
|
|
||||||
sudo chmod +x /root/monitor/setup/install_S905X_BI.sh
|
sudo chmod +x /root/monitor/setup/install_S905X_BI.sh
|
||||||
|
sudo chmod +x /root/monitor/setup/capture.sh
|
||||||
sudo chmod +x /root/monitor/setup/key.sh
|
sudo chmod +x /root/monitor/setup/key.sh
|
||||||
# ******************Autossh******************
|
# ******************Autossh******************
|
||||||
#
|
#
|
||||||
|
@ -23,9 +24,15 @@ sudo apt install -y autossh
|
||||||
echo "install screen"
|
echo "install screen"
|
||||||
sudo apt install -y screen
|
sudo apt install -y screen
|
||||||
chmod 777 /var/run/screen
|
chmod 777 /var/run/screen
|
||||||
#****************run_cms rc.local*************
|
#************capture***************
|
||||||
|
echo "install lib capture"
|
||||||
|
sudo apt install -y sshpass
|
||||||
|
sudo apt install -y gnome-screenshot
|
||||||
|
#************install v4l***************
|
||||||
|
echo "install v4l"
|
||||||
|
sudo apt-get install -y v4l-utils
|
||||||
|
#****************rc.local*************
|
||||||
echo "setup rc.local"
|
echo "setup rc.local"
|
||||||
echo > /etc/rc.local
|
|
||||||
echo '#!/bin/sh -e
|
echo '#!/bin/sh -e
|
||||||
#
|
#
|
||||||
# rc.local
|
# rc.local
|
||||||
|
@ -50,7 +57,7 @@ fi
|
||||||
|
|
||||||
echo "Begin rc.local. Time restart: $time_begin" >> /root/monitor/log/rc_local.log
|
echo "Begin rc.local. Time restart: $time_begin" >> /root/monitor/log/rc_local.log
|
||||||
|
|
||||||
#sudo /root/monitor/CMS/run_cms.sh
|
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||||
|
|
||||||
exit 0' > /etc/rc.local
|
exit 0' > /etc/rc.local
|
||||||
#
|
#
|
||||||
|
@ -73,44 +80,18 @@ ExecStart=/usr/bin/env /root/monitor/launcher/S905X_BI
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" >> S905X_BI.service
|
WantedBy=multi-user.target" >> S905X_BI.service
|
||||||
sudo chmod 755 /etc/systemd/system/S905X_BI.service
|
sudo chmod 755 S905X_BI.service
|
||||||
sudo systemctl start S905X_BI
|
sudo systemctl start S905X_BI
|
||||||
sudo systemctl enable S905X_BI
|
sudo systemctl enable S905X_BI
|
||||||
#
|
|
||||||
#******************serverUART*************************
|
|
||||||
#echo "setup service serverUART"
|
|
||||||
#cd /etc/systemd/system/
|
|
||||||
#echo "[Unit]
|
|
||||||
#Description=serverUART
|
|
||||||
#After=network.target
|
|
||||||
#StartLimitIntervalSec=0
|
|
||||||
#[Service]
|
|
||||||
#Type=simple
|
|
||||||
#Restart=always
|
|
||||||
#RestartSec=1
|
|
||||||
#User=root
|
|
||||||
#ExecStart=/usr/bin/env /root/monitor/setup/serverUART
|
|
||||||
#
|
|
||||||
#[Install]
|
|
||||||
#WantedBy=multi-user.target" >> serverUART.service
|
|
||||||
#sudo chmod 755 serverUART.service
|
|
||||||
#sudo systemctl start serverUART
|
|
||||||
#sudo systemctl enable serverUART
|
|
||||||
#*************setup Opencv***************
|
|
||||||
#echo "install Opencv"
|
|
||||||
#cd /root/monitor/setup
|
|
||||||
#tar -xvzf install_box-master.tar.gz
|
|
||||||
#sudo chmod +x /root/monitor/setup/install_box/install_box.sh
|
|
||||||
#sudo /root/monitor/setup/install_box/install_box.sh
|
|
||||||
#
|
|
||||||
#*************Copy key ssh***************
|
#*************Copy key ssh***************
|
||||||
echo "copy key"
|
echo "copy key"
|
||||||
sudo /root/monitor/setup/key.sh
|
sudo /root/monitor/setup/key.sh
|
||||||
|
rm /root/monitor/setup/key.sh
|
||||||
#
|
#
|
||||||
#*************setup schedule crontab**********
|
#*************setup schedule crontab**********
|
||||||
echo "setup schedule crontab"
|
echo "setup schedule crontab"
|
||||||
echo "55 5 * * * sudo /root/monitor/cache/clearcache.sh" >> /var/spool/cron/crontabs/root
|
echo "55 5 * * * sudo /root/monitor/cache/clearcache.sh" >> /var/spool/cron/crontabs/root
|
||||||
echo "56 5 * * * sudo /root/monitor/cache/restart_service.sh" >> /var/spool/cron/crontabs/root
|
echo "50 5 * * * sudo /root/monitor/cache/restart_service.sh" >> /var/spool/cron/crontabs/root
|
||||||
#
|
#
|
||||||
#*************setup autologin***************
|
#*************setup autologin***************
|
||||||
echo "setup autologin"
|
echo "setup autologin"
|
||||||
|
@ -123,7 +104,7 @@ autologin-user-timeout=0
|
||||||
" >> 11-armbian.conf
|
" >> 11-armbian.conf
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
sudo apt-get -y update
|
|
||||||
rm /root/monitor/setup/key.sh
|
|
||||||
#
|
#
|
||||||
reboot
|
sudo apt-get -y update
|
||||||
|
#
|
||||||
|
reboot
|
Loading…
Reference in New Issue
Block a user