commit b0aae1dbecef0fe9e6976b2839e09fc7cd1aae18 Author: thaonguyen Date: Thu Dec 22 11:36:36 2022 +0700 thao test pm2 diff --git a/monitor/cache/clearcache.sh b/monitor/cache/clearcache.sh new file mode 100644 index 0000000..c1db7bd --- /dev/null +++ b/monitor/cache/clearcache.sh @@ -0,0 +1,6 @@ +#!/bin/bash +sync; echo 1 > /proc/sys/vm/drop_caches +time_begin=$(date) +echo "$time_begin : clearcache!!" >> /root/monitor/log/cache.txt +echo "************************************" >> /root/monitor/log/cache.txt +exit 0 \ No newline at end of file diff --git a/monitor/cache/restart_service.sh b/monitor/cache/restart_service.sh new file mode 100644 index 0000000..d123a0b --- /dev/null +++ b/monitor/cache/restart_service.sh @@ -0,0 +1,6 @@ +#!/bin/bash +time_begin=$(date) +echo "$time_begin : restart service!!" >> /root/monitor/log/cache.txt +#systemctl restart S905X_BI +echo "************************************" >> /root/monitor/log/cache.txt +exit 0 diff --git a/monitor/check/Check_engine b/monitor/check/Check_engine new file mode 100644 index 0000000..d6b20d3 Binary files /dev/null and b/monitor/check/Check_engine differ diff --git a/monitor/engine/engine.txt b/monitor/engine/engine.txt new file mode 100644 index 0000000..e69de29 diff --git a/monitor/launcher/S905X_BI b/monitor/launcher/S905X_BI new file mode 100644 index 0000000..66e5887 Binary files /dev/null and b/monitor/launcher/S905X_BI differ diff --git a/monitor/log/capture/log.txt b/monitor/log/capture/log.txt new file mode 100644 index 0000000..fbf828d --- /dev/null +++ b/monitor/log/capture/log.txt @@ -0,0 +1 @@ +log \ No newline at end of file diff --git a/monitor/log/log_engine/log.txt b/monitor/log/log_engine/log.txt new file mode 100644 index 0000000..fbf828d --- /dev/null +++ b/monitor/log/log_engine/log.txt @@ -0,0 +1 @@ +log \ No newline at end of file diff --git a/monitor/log/log_launcher/log.txt b/monitor/log/log_launcher/log.txt new file mode 100644 index 0000000..fbf828d --- /dev/null +++ b/monitor/log/log_launcher/log.txt @@ -0,0 +1 @@ +log \ No newline at end of file diff --git a/monitor/setup/apiConfig.txt b/monitor/setup/apiConfig.txt new file mode 100644 index 0000000..86ddfde --- /dev/null +++ b/monitor/setup/apiConfig.txt @@ -0,0 +1 @@ +{"servermqtt":"","url":""} \ No newline at end of file diff --git a/monitor/setup/capture.sh b/monitor/setup/capture.sh new file mode 100644 index 0000000..5345e76 --- /dev/null +++ b/monitor/setup/capture.sh @@ -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 \ No newline at end of file diff --git a/monitor/setup/configcam.json b/monitor/setup/configcam.json new file mode 100644 index 0000000..ee5b976 --- /dev/null +++ b/monitor/setup/configcam.json @@ -0,0 +1,6 @@ +{ + "camera": { + "translate_x": 0, + "traslate_y": 0 + } +} \ No newline at end of file diff --git a/monitor/setup/datetime b/monitor/setup/datetime new file mode 100644 index 0000000..fb19235 Binary files /dev/null and b/monitor/setup/datetime differ diff --git a/monitor/setup/install_S905X_BI.sh b/monitor/setup/install_S905X_BI.sh new file mode 100644 index 0000000..eabc07e --- /dev/null +++ b/monitor/setup/install_S905X_BI.sh @@ -0,0 +1,29 @@ +#!/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 diff --git a/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W01.ttf b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W01.ttf new file mode 100644 index 0000000..12aa94a Binary files /dev/null and b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W01.ttf differ diff --git a/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W02.ttf b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W02.ttf new file mode 100644 index 0000000..b1ac708 Binary files /dev/null and b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W02.ttf differ diff --git a/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W03.ttf b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W03.ttf new file mode 100644 index 0000000..027535f Binary files /dev/null and b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W03.ttf differ diff --git a/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W04.ttf b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W04.ttf new file mode 100644 index 0000000..4e821f2 Binary files /dev/null and b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W04.ttf differ diff --git a/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W05.ttf b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W05.ttf new file mode 100644 index 0000000..612697e Binary files /dev/null and b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体-W05.ttf differ diff --git a/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体使用声明.docx b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体使用声明.docx new file mode 100644 index 0000000..827adfa Binary files /dev/null and b/monitor/setup/install_font_style/chinese/站酷仓耳渔阳体使用声明.docx differ diff --git a/monitor/setup/install_font_style/installfont.sh b/monitor/setup/install_font_style/installfont.sh new file mode 100644 index 0000000..88aa123 --- /dev/null +++ b/monitor/setup/install_font_style/installfont.sh @@ -0,0 +1,5 @@ +#!/bin/bash +scp -r * /usr/share/fonts/truetype/ +fc-cache -f -v +echo "Setup font text done!" +exit 0 \ No newline at end of file diff --git a/monitor/setup/install_font_style/japan/HGRGE.TTC b/monitor/setup/install_font_style/japan/HGRGE.TTC new file mode 100644 index 0000000..e5c9b63 Binary files /dev/null and b/monitor/setup/install_font_style/japan/HGRGE.TTC differ diff --git a/monitor/setup/install_font_style/japan/HGRKK.TTC b/monitor/setup/install_font_style/japan/HGRKK.TTC new file mode 100644 index 0000000..3df188c Binary files /dev/null and b/monitor/setup/install_font_style/japan/HGRKK.TTC differ diff --git a/monitor/setup/install_font_style/japan/HGRPP1.TTC b/monitor/setup/install_font_style/japan/HGRPP1.TTC new file mode 100644 index 0000000..3676d30 Binary files /dev/null and b/monitor/setup/install_font_style/japan/HGRPP1.TTC differ diff --git a/monitor/setup/install_font_style/japan/HGRSGU.TTC b/monitor/setup/install_font_style/japan/HGRSGU.TTC new file mode 100644 index 0000000..b83b9d3 Binary files /dev/null and b/monitor/setup/install_font_style/japan/HGRSGU.TTC differ diff --git a/monitor/setup/install_font_style/japan/HGRSKP.TTF b/monitor/setup/install_font_style/japan/HGRSKP.TTF new file mode 100644 index 0000000..4de6198 Binary files /dev/null and b/monitor/setup/install_font_style/japan/HGRSKP.TTF differ diff --git a/monitor/setup/install_font_style/japan/HGRSMP.TTF b/monitor/setup/install_font_style/japan/HGRSMP.TTF new file mode 100644 index 0000000..92bf1f6 Binary files /dev/null and b/monitor/setup/install_font_style/japan/HGRSMP.TTF differ diff --git a/monitor/setup/install_font_style/japan/NFa1kp.ttc b/monitor/setup/install_font_style/japan/NFa1kp.ttc new file mode 100644 index 0000000..c76e544 Binary files /dev/null and b/monitor/setup/install_font_style/japan/NFa1kp.ttc differ diff --git a/monitor/setup/install_font_style/japan/NTk3kp.ttc b/monitor/setup/install_font_style/japan/NTk3kp.ttc new file mode 100644 index 0000000..5969656 Binary files /dev/null and b/monitor/setup/install_font_style/japan/NTk3kp.ttc differ diff --git a/monitor/setup/install_font_style/japan/VTIMESN0.TTF b/monitor/setup/install_font_style/japan/VTIMESN0.TTF new file mode 100644 index 0000000..b693652 Binary files /dev/null and b/monitor/setup/install_font_style/japan/VTIMESN0.TTF differ diff --git a/monitor/setup/install_font_style/japan/epgyobld.ttf b/monitor/setup/install_font_style/japan/epgyobld.ttf new file mode 100644 index 0000000..dd42f0e Binary files /dev/null and b/monitor/setup/install_font_style/japan/epgyobld.ttf differ diff --git a/monitor/setup/install_font_style/japan/epgyosho.ttf b/monitor/setup/install_font_style/japan/epgyosho.ttf new file mode 100644 index 0000000..a2167a3 Binary files /dev/null and b/monitor/setup/install_font_style/japan/epgyosho.ttf differ diff --git a/monitor/setup/install_font_style/japan/epkaisho.ttf b/monitor/setup/install_font_style/japan/epkaisho.ttf new file mode 100644 index 0000000..c96da10 Binary files /dev/null and b/monitor/setup/install_font_style/japan/epkaisho.ttf differ diff --git a/monitor/setup/install_font_style/japan/epkgobld.ttf b/monitor/setup/install_font_style/japan/epkgobld.ttf new file mode 100644 index 0000000..2a1c115 Binary files /dev/null and b/monitor/setup/install_font_style/japan/epkgobld.ttf differ diff --git a/monitor/setup/install_font_style/japan/epkyouka.ttf b/monitor/setup/install_font_style/japan/epkyouka.ttf new file mode 100644 index 0000000..3b28fab Binary files /dev/null and b/monitor/setup/install_font_style/japan/epkyouka.ttf differ diff --git a/monitor/setup/install_font_style/japan/epmarugo.ttf b/monitor/setup/install_font_style/japan/epmarugo.ttf new file mode 100644 index 0000000..71e77ea Binary files /dev/null and b/monitor/setup/install_font_style/japan/epmarugo.ttf differ diff --git a/monitor/setup/install_font_style/japan/epmgobld.ttf b/monitor/setup/install_font_style/japan/epmgobld.ttf new file mode 100644 index 0000000..44529e0 Binary files /dev/null and b/monitor/setup/install_font_style/japan/epmgobld.ttf differ diff --git a/monitor/setup/install_font_style/japan/epminbld.ttf b/monitor/setup/install_font_style/japan/epminbld.ttf new file mode 100644 index 0000000..69f2930 Binary files /dev/null and b/monitor/setup/install_font_style/japan/epminbld.ttf differ diff --git a/monitor/setup/install_font_style/korean/NotoSansKR-Black.otf b/monitor/setup/install_font_style/korean/NotoSansKR-Black.otf new file mode 100644 index 0000000..0cfa4bb Binary files /dev/null and b/monitor/setup/install_font_style/korean/NotoSansKR-Black.otf differ diff --git a/monitor/setup/install_font_style/korean/NotoSansKR-Bold.otf b/monitor/setup/install_font_style/korean/NotoSansKR-Bold.otf new file mode 100644 index 0000000..7f4131c Binary files /dev/null and b/monitor/setup/install_font_style/korean/NotoSansKR-Bold.otf differ diff --git a/monitor/setup/install_font_style/korean/NotoSansKR-Light.otf b/monitor/setup/install_font_style/korean/NotoSansKR-Light.otf new file mode 100644 index 0000000..03f948c Binary files /dev/null and b/monitor/setup/install_font_style/korean/NotoSansKR-Light.otf differ diff --git a/monitor/setup/install_font_style/korean/NotoSansKR-Medium.otf b/monitor/setup/install_font_style/korean/NotoSansKR-Medium.otf new file mode 100644 index 0000000..d8cacce Binary files /dev/null and b/monitor/setup/install_font_style/korean/NotoSansKR-Medium.otf differ diff --git a/monitor/setup/install_font_style/korean/NotoSansKR-Regular.otf b/monitor/setup/install_font_style/korean/NotoSansKR-Regular.otf new file mode 100644 index 0000000..e26c1cd Binary files /dev/null and b/monitor/setup/install_font_style/korean/NotoSansKR-Regular.otf differ diff --git a/monitor/setup/install_font_style/korean/NotoSansKR-Thin.otf b/monitor/setup/install_font_style/korean/NotoSansKR-Thin.otf new file mode 100644 index 0000000..6bc00c4 Binary files /dev/null and b/monitor/setup/install_font_style/korean/NotoSansKR-Thin.otf differ diff --git a/monitor/setup/install_font_style/korean/OFL.txt b/monitor/setup/install_font_style/korean/OFL.txt new file mode 100644 index 0000000..c985727 --- /dev/null +++ b/monitor/setup/install_font_style/korean/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2012 Google Inc. All Rights Reserved. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/monitor/setup/key.sh b/monitor/setup/key.sh new file mode 100644 index 0000000..f67cedb --- /dev/null +++ b/monitor/setup/key.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# +cd +sudo mkdir ./.ssh +cd ./.ssh +echo "ssh_tunnel.beetai.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDrPNPKCfNJ9Vg1vrTXP7iwYDMr8qtXroacRfjrhOWup6rGvaLGBCzuRcbHEBDxmHxTzc/VsSSbD5HQn/31GDPM=" >> known_hosts +echo "-----BEGIN RSA PRIVATE KEY----- +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 +-----END RSA PRIVATE KEY-----" >> id_rsa +sudo chmod 600 id_rsa +exit 0 diff --git a/monitor/setup/permission.sh b/monitor/setup/permission.sh new file mode 100644 index 0000000..e4ba84f --- /dev/null +++ b/monitor/setup/permission.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +#*************cap quyen**************************** +echo "cap quyen" +chown root:root /etc/sudoers +sudo chmod +x /root/monitor/cache/clearcache.sh +sudo chmod +x /root/monitor/cache/restart_service.sh +sudo chmod +x /root/monitor/check/Check_engine +sudo chmod +x /root/monitor/launcher/S905X_BI +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/serverlite.sh +sudo chmod +x /root/monitor/setup/datetime +sudo chmod +x /root/monitor/setup/update_serverlite.sh +sudo chmod +x /root/monitor/setup/install_font_style/installfont.sh +exit 0 \ No newline at end of file diff --git a/monitor/setup/pm2setup.sh b/monitor/setup/pm2setup.sh new file mode 100644 index 0000000..072ab9a --- /dev/null +++ b/monitor/setup/pm2setup.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# xoa run tmux server lite trong rc.local + + +# Cai dat PM2 run Server lite +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash +source ~/.bashrc +nvm install v16.18.1 +npm install pm2 -g +cd /root/monitor/setup/ +pm2 ecosystem +echo " +module.exports = { + apps : [ + { + name: 'Server_lite', + cwd: '/root/BiFace_Server_Config_API', + script: 'server.js', + args: '', + interpreter: 'node', + restart_delay: 1000, + cron_restart: '0 0 * * *', + watch: false, + time: true + } +] +}; +" > ecosystem.config.js +# Khởi chạy pm2 vs cấu hình vừa sửa +pm2 reload ecosystem.config.js + +# Cài đặt pm2 khởi động cùng Win/Ubuntu +pm2 startup +# Copy-paste và chạy dòng script hiện trên màn hình +pm2 save +reboot +exit 0 diff --git a/monitor/setup/run_all.sh b/monitor/setup/run_all.sh new file mode 100644 index 0000000..9645174 --- /dev/null +++ b/monitor/setup/run_all.sh @@ -0,0 +1,229 @@ +#!/bin/bash +#***************DNS**************************** +echo "nameserver 8.8.8.8" > /etc/resolv.conf +sudo rm /var/lib/dpkg/lock +sudo dpkg --configure -a +sudo apt update && sudo apt upgrade -y +#***************set time**************************** +echo "Set timezon" +unlink /etc/localtime +ln -s /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime +#*************cap quyen**************************** +echo "cap quyen" +chown root:root /etc/sudoers +sudo chmod +x /root/monitor/cache/clearcache.sh +sudo chmod +x /root/monitor/cache/restart_service.sh +sudo chmod +x /root/monitor/check/Check_engine +sudo chmod +x /root/monitor/launcher/S905X_BI +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/serverlite.sh +sudo chmod +x /root/monitor/setup/datetime +sudo chmod +x /root/monitor/setup/update_serverlite.sh +sudo chmod +x /root/monitor/setup/run_crontab.sh +sudo chmod +x /root/monitor/setup/install_font_style/installfont.sh +# CHANGE NAME BOX +echo "BIFACE" > /etc/hostname +# ******************Install Lib Soud****************** +#sudo apt install sox libsox-fmt-all +sudo apt install -y sox libsox-fmt-all ffmpeg libnotify-bin +# ******************Autossh****************** +# +echo "install auto ssh" +sudo apt install -y autossh +#*****************Screen******************** +echo "install screen" +sudo apt install -y screen +chmod 777 /var/run/screen +#************capture*************** +echo "install lib capture" +sudo apt install -y sshpass +sudo apt install -y gnome-screenshot +#****************rc.local************* +echo "setup rc.local" +echo '#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + + +#/boot/fan.sh & + +if [ ! -d /var/run/sshd ]; then + mkdir /var/run/sshd + chmod 0755 /var/run/sshd + systemctl restart ssh +fi + +time_begin=$(date) +echo "Begin rc.local. Time restart: $time_begin" >> /root/monitor/log/rc_local.log +echo "nameserver 8.8.8.8" > /etc/resolv.conf +exit 0' > /etc/rc.local +# +echo "network" +# echo -e "#IP#\n\n###" > /etc/network/interfaces +# +#*************setup service S905X_BI*************** +echo "setup autorun 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 +#*************Copy key ssh*************** +echo "copy key" +sudo /root/monitor/setup/key.sh +rm /root/monitor/setup/key.sh +# +#*************setup schedule crontab********** +echo "setup schedule crontab" +echo "55 5 * * * sudo /root/monitor/cache/clearcache.sh" > /var/spool/cron/crontabs/root +echo "50 5 * * * sudo /root/monitor/cache/restart_service.sh" >> /var/spool/cron/crontabs/root +# +#*************setup autologin*************** +echo "setup autologin" +os_version=$(cat /etc/issue |grep "Ubuntu 18.04") +if [ -n "$os_version" ]; then +sudo apt-get install -y rng-tools +cd /etc/lightdm/lightdm.conf.d +echo "autologin-user=root +autologin-user-timeout=0 +" >> 11-armbian.conf +fi +# +#*************setup serverlite********** +sudo /root/monitor/setup/serverlite.sh +# +#*************install p7zip-full************** +sudo apt install p7zip-full +# Disable ttyS0 +systemctl stop serial-getty@ttyS0.service +systemctl daemon-reload +systemctl disable serial-getty@ttyS0.service +# Install font +sudo /root/monitor/setup/install_font_style/installfont.sh +# +sudo apt-get -y update +echo "================================ install v4l ================================" +sudo apt-get install -y v4l-utils +#************install tmux*************** +echo "================================ install tmux ================================" +sudo apt install -y tmux +#*************install p7zip-full************** +echo "================================ install p7zip ================================" +sudo apt install -y p7zip-full +# +#****************rc.local************* +echo "================================ setup rc.local ================================" +echo '#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + + +#/boot/fan.sh & + +if [ ! -d /var/run/sshd ]; then + mkdir /var/run/sshd + chmod 0755 /var/run/sshd + systemctl restart ssh +fi +time_begin=$(date) +echo "Begin rc.local. Time restart: $time_begin" >> /root/monitor/log/rc_local.log +echo "nameserver 8.8.8.8" > /etc/resolv.conf +exit 0' > /etc/rc.local +# +echo "================================ update serverlite ===============================" +sudo apt -y update +sudo apt-get install -y apache2 +cd /var/www +sudo chmod -R 0777 html +cd html +if [ "$1" = pro ] +then git clone -b BiFacePro2.0.1 http://gitea.beetai.com/dongpd/BiFace_Server_Lite +else git clone -b cloud http://gitea.beetai.com/dongpd/BiFace_Server_Lite +fi +sudo chmod -R 0777 BiFace_Server_Lite +sudo apt-get install -y libapache2-mod-php php php-common php-curl php-dev php-gd php-pear php-imagick php-mysql php-xsl php-sqlite3 php-zip +echo " + + # The ServerName directive sets the request scheme, hostname and port that + # the server uses to identify itself. This is used when creating + # redirection URLs. In the context of virtual hosts, the ServerName + # specifies what hostname must appear in the request's Host: header to + # match this virtual host. For the default virtual host (this file) this + # value is not decisive as it is used as a last resort host regardless. + # However, you must set it for any further virtual host explicitly. + #ServerName www.example.com + + ServerAdmin webmaster@localhost + #DocumentRoot /var/www/html + DocumentRoot /var/www/html/BiFace_Server_Lite/web + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, + # error, crit, alert, emerg. + # It is also possible to configure the loglevel for particular + # modules, e.g. + #LogLevel info ssl:warn + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + # For most configuration files from conf-available/, which are + # enabled or disabled at a global level, it is possible to + # include a line for only one particular virtual host. For example the + # following line enables the CGI configuration for this host only + # after it has been globally disabled with "a2disconf". + #Include conf-available/serve-cgi-bin.conf + + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +" > /etc/apache2/sites-available/000-default.conf +sudo a2enmod rewrite +sudo service apache2 restart +# sudo echo "* * * * * php /var/www/html/BiFace_Server_Lite/yii sync" >> /var/spool/cron/crontabs/root +# +cd /root +git clone http://gitea.beetai.com/dongpd/BiFace_Server_Config_API.git +sudo apt-get install -y nodejs npm +sudo apt-get install -y nodejs-dev node-gyp libssl1.0-dev +sudo apt install -y npm +cd BiFace_Server_Config_API +npm install +sudo bash /etc/rc.local +cd /var/www/html/BiFace_Server_Lite +sudo chmod 0777 db/app.db +echo "================================ setup serverlite done! ================================" \ No newline at end of file diff --git a/monitor/setup/run_crontab.sh b/monitor/setup/run_crontab.sh new file mode 100644 index 0000000..8ead8b2 --- /dev/null +++ b/monitor/setup/run_crontab.sh @@ -0,0 +1,2 @@ +#!/bin/bash +echo "run_crontab done!" > /root/monitor/setup/run_crontab.txt diff --git a/monitor/setup/serverlite.sh b/monitor/setup/serverlite.sh new file mode 100644 index 0000000..70d10a2 --- /dev/null +++ b/monitor/setup/serverlite.sh @@ -0,0 +1,117 @@ +#!/bin/bash +#*************cap quyen**************************** +echo "cap quyen" +chown root:root /etc/sudoers +sudo chmod +x /root/monitor/cache/clearcache.sh +sudo chmod +x /root/monitor/cache/restart_service.sh +sudo chmod +x /root/monitor/check/Check_engine +sudo chmod +x /root/monitor/launcher/S905X_BI +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/serverlite.sh +sudo chmod +x /root/monitor/setup/datetime +sudo chmod +x /root/monitor/setup/update_serverlite.sh +echo "================================ install v4l ================================" +sudo apt-get install -y v4l-utils +#************install tmux*************** +echo "================================ install tmux ================================" +sudo apt install -y tmux +#*************install p7zip-full************** +echo "================================ install p7zip ================================" +sudo apt install -y p7zip-full +# +#****************rc.local************* +echo "================================ setup rc.local ================================" +echo '#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + + +#/boot/fan.sh & + +if [ ! -d /var/run/sshd ]; then + mkdir /var/run/sshd + chmod 0755 /var/run/sshd + systemctl restart ssh +fi +time_begin=$(date) +echo "Begin rc.local. Time restart: $time_begin" >> /root/monitor/log/rc_local.log +echo "nameserver 8.8.8.8" > /etc/resolv.conf +exit 0' > /etc/rc.local +# +echo "================================ update serverlite ===============================" +sudo apt -y update +sudo apt-get install -y apache2 +cd /var/www +sudo chmod -R 0777 html +cd html +if [ "$1" = pro ] +then git clone -b BiFacePro2.0.1 http://gitea.beetai.com/dongpd/BiFace_Server_Lite +else git clone -b cloud http://gitea.beetai.com/dongpd/BiFace_Server_Lite +fi +sudo chmod -R 0777 BiFace_Server_Lite +sudo apt-get install -y libapache2-mod-php php php-common php-curl php-dev php-gd php-pear php-imagick php-mysql php-xsl php-sqlite3 php-zip +echo " + + # The ServerName directive sets the request scheme, hostname and port that + # the server uses to identify itself. This is used when creating + # redirection URLs. In the context of virtual hosts, the ServerName + # specifies what hostname must appear in the request's Host: header to + # match this virtual host. For the default virtual host (this file) this + # value is not decisive as it is used as a last resort host regardless. + # However, you must set it for any further virtual host explicitly. + #ServerName www.example.com + + ServerAdmin webmaster@localhost + #DocumentRoot /var/www/html + DocumentRoot /var/www/html/BiFace_Server_Lite/web + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, + # error, crit, alert, emerg. + # It is also possible to configure the loglevel for particular + # modules, e.g. + #LogLevel info ssl:warn + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + # For most configuration files from conf-available/, which are + # enabled or disabled at a global level, it is possible to + # include a line for only one particular virtual host. For example the + # following line enables the CGI configuration for this host only + # after it has been globally disabled with "a2disconf". + #Include conf-available/serve-cgi-bin.conf + + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +" > /etc/apache2/sites-available/000-default.conf +sudo a2enmod rewrite +sudo service apache2 restart +# sudo echo "* * * * * php /var/www/html/BiFace_Server_Lite/yii sync" >> /var/spool/cron/crontabs/root +# +cd /root +git clone http://gitea.beetai.com/dongpd/BiFace_Server_Config_API.git +sudo apt-get install -y nodejs npm +sudo apt-get install -y nodejs-dev node-gyp libssl1.0-dev +sudo apt install -y npm +cd BiFace_Server_Config_API +npm install +sudo bash /etc/rc.local +cd /var/www/html/BiFace_Server_Lite +sudo chmod 0777 db/app.db +echo "================================ setup serverlite done! ================================" +exit 0 diff --git a/monitor/setup/setip.sh b/monitor/setup/setip.sh new file mode 100644 index 0000000..aa0148d --- /dev/null +++ b/monitor/setup/setip.sh @@ -0,0 +1,35 @@ +#!/bin/bash +echo 'auto lo +iface lo inet interface + +auto eth0' > /etc/network/interfaces +echo "Enter the type IPaddress" +read type +echo "iface eth0 inet $type" >> /etc/network/interfaces +if [ "$type" = static ] +then +echo "Enter the IP: " +read ipaddr +echo " address $ipaddr" >> /etc/network/interfaces +echo "Enter the netmask: " +read netmask +echo " netmask $netmask" >> /etc/network/interfaces +echo "Enter the gateway: " +read gateway +echo " gateway $gateway" >> /etc/network/interfaces +echo "Enter the dns-nameservers: " +read dns +echo " dns-nameservers $dns" >> /etc/network/interfaces +else echo "Setup IP success!!!" +fi +while true; do + read -p "Do you wish to reboot device?(y/n)" yn + case $yn in + [Yy]* ) reboot; break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done + +exit 0 + diff --git a/monitor/setup/setup.sh b/monitor/setup/setup.sh new file mode 100644 index 0000000..1e2fbd9 --- /dev/null +++ b/monitor/setup/setup.sh @@ -0,0 +1,132 @@ +#!/bin/bash +#***************DNS**************************** +echo "nameserver 8.8.8.8" > /etc/resolv.conf +sudo rm /var/lib/dpkg/lock +sudo dpkg --configure -a +sudo apt update && sudo apt upgrade -y +#***************set time**************************** +echo "Set timezon" +unlink /etc/localtime +ln -s /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime +#*************cap quyen**************************** +echo "cap quyen" +chown root:root /etc/sudoers +sudo chmod +x /root/monitor/cache/clearcache.sh +sudo chmod +x /root/monitor/cache/restart_service.sh +sudo chmod +x /root/monitor/check/Check_engine +sudo chmod +x /root/monitor/launcher/S905X_BI +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/serverlite.sh +sudo chmod +x /root/monitor/setup/datetime +sudo chmod +x /root/monitor/setup/update_serverlite.sh +sudo chmod +x /root/monitor/setup/run_crontab.sh +sudo chmod +x /root/monitor/setup/install_font_style/installfont.sh +# CHANGE NAME BOX +echo "BIFACE" > /etc/hostname +# ******************Install Lib Soud****************** +#sudo apt install sox libsox-fmt-all +sudo apt install -y sox libsox-fmt-all ffmpeg libnotify-bin +# ******************Autossh****************** +# +echo "install auto ssh" +sudo apt install -y autossh +#*****************Screen******************** +echo "install screen" +sudo apt install -y screen +chmod 777 /var/run/screen +#************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 '#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + + +#/boot/fan.sh & + +if [ ! -d /var/run/sshd ]; then + mkdir /var/run/sshd + chmod 0755 /var/run/sshd + systemctl restart ssh +fi + +time_begin=$(date) +echo "Begin rc.local. Time restart: $time_begin" >> /root/monitor/log/rc_local.log +echo "nameserver 8.8.8.8" > /etc/resolv.conf +exit 0' > /etc/rc.local +# +echo "network" +# echo -e "#IP#\n\n###" > /etc/network/interfaces +# +#*************setup service S905X_BI*************** +echo "setup autorun 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 +#*************Copy key ssh*************** +echo "copy key" +sudo /root/monitor/setup/key.sh +rm /root/monitor/setup/key.sh +# +#*************setup schedule crontab********** +echo "setup schedule crontab" +echo "55 5 * * * sudo /root/monitor/cache/clearcache.sh" > /var/spool/cron/crontabs/root +echo "50 5 * * * sudo /root/monitor/cache/restart_service.sh" >> /var/spool/cron/crontabs/root +# +#*************setup autologin*************** +echo "setup autologin" +os_version=$(cat /etc/issue |grep "Ubuntu 18.04") +if [ -n "$os_version" ]; then +sudo apt-get install -y rng-tools +cd /etc/lightdm/lightdm.conf.d +echo "autologin-user=root +autologin-user-timeout=0 +" >> 11-armbian.conf +fi +# +#*************setup serverlite********** +sudo /root/monitor/setup/serverlite.sh +# +#*************install p7zip-full************** +sudo apt install p7zip-full +# Disable ttyS0 +systemctl stop serial-getty@ttyS0.service +systemctl daemon-reload +systemctl disable serial-getty@ttyS0.service +# Install font +sudo /root/monitor/setup/install_font_style/installfont.sh +# +sudo apt-get -y update +# +reboot \ No newline at end of file diff --git a/monitor/setup/update_serverlite.sh b/monitor/setup/update_serverlite.sh new file mode 100644 index 0000000..8ca5590 --- /dev/null +++ b/monitor/setup/update_serverlite.sh @@ -0,0 +1,33 @@ +#!/bin/bash +#*************cap quyen**************************** +echo "cap quyen" +chown root:root /etc/sudoers +sudo chmod +x /root/monitor/cache/clearcache.sh +sudo chmod +x /root/monitor/cache/restart_service.sh +sudo chmod +x /root/monitor/check/Check_engine +sudo chmod +x /root/monitor/launcher/S905X_BI +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/serverlite.sh +sudo chmod +x /root/monitor/setup/datetime +sudo chmod +x /root/monitor/setup/update_serverlite.sh +echo "================================ update serverlite ===============================" +cd /var/www +sudo chmod -R 0777 html +cd html +sudo rm -rf BiFace_Server_Lite +if [ "$1" = pro ] +then git clone -b BiFacePro2.0.1 http://gitea.beetai.com/dongpd/BiFace_Server_Lite +else git clone -b cloud http://gitea.beetai.com/dongpd/BiFace_Server_Lite +fi +sudo chmod -R 0777 BiFace_Server_Lite +cd /root +sudo rm -rf BiFace_Server_Config_API +git clone http://gitea.beetai.com/dongpd/BiFace_Server_Config_API.git +cd BiFace_Server_Config_API +npm install +cd /var/www/html/BiFace_Server_Lite +sudo chmod 0777 db/app.db +echo "================================ update serverlite done!!! ===============================" +reboot diff --git a/monitor/setup/winter.png b/monitor/setup/winter.png new file mode 100644 index 0000000..8a9104c Binary files /dev/null and b/monitor/setup/winter.png differ