Update cache and setup folder
This commit is contained in:
parent
dc5779959e
commit
2d1b2250e6
5
monitor/cache/clearcache.sh
vendored
5
monitor/cache/clearcache.sh
vendored
|
@ -1,9 +1,6 @@
|
|||
#!/bin/bash
|
||||
sync; echo 1 > /proc/sys/vm/drop_caches
|
||||
systemctl restart S905X_BI
|
||||
time_begin=$(date)
|
||||
echo "$time_begin : clearcache & Restart service S905X & reboot!!" >> /root/monitor/log/cache.txt
|
||||
echo "$time_begin : clearcache!!" >> /root/monitor/log/cache.txt
|
||||
echo "************************************" >> /root/monitor/log/cache.txt
|
||||
sleep 5
|
||||
reboot
|
||||
exit 0
|
6
monitor/cache/restart_service.sh
vendored
Normal file
6
monitor/cache/restart_service.sh
vendored
Normal file
|
@ -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
|
|
@ -8,22 +8,23 @@ echo "cap quyen"
|
|||
chown root:root /etc/sudoers
|
||||
export DISPLAY =:0
|
||||
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/CMS/install.sh
|
||||
sudo chmod +x /root/monitor/CMS/run_cms.sh
|
||||
#sudo chmod +x /root/monitor/CMS/run_cms.sh
|
||||
sudo chmod +x /root/monitor/setup/run_CMS.sh install_S905X_BI.sh
|
||||
sudo chmod +x /root/monitor/setup/key.sh
|
||||
#******************CMS*************************
|
||||
echo "install CMS"
|
||||
sudo /root/monitor/CMS/install.sh
|
||||
# echo "install CMS"
|
||||
# sudo /root/monitor/CMS/install.sh
|
||||
# ******************Autossh******************
|
||||
#
|
||||
echo "install auto ssh"
|
||||
sudo apt-get install -y autossh
|
||||
sudo apt install -y autossh
|
||||
#*****************Screen********************
|
||||
echo "install screen"
|
||||
sudo apt-get install -y screen
|
||||
sudo apt install -y screen
|
||||
chmod 777 /var/run/screen
|
||||
#****************run_cms rc.local*************
|
||||
echo "setup rc.local"
|
||||
|
@ -52,7 +53,7 @@ fi
|
|||
|
||||
echo "Begin rc.local. Time restart: $time_begin" >> /root/monitor/log/rc_local.log
|
||||
|
||||
sudo /root/monitor/CMS/run_cms.sh
|
||||
#sudo /root/monitor/CMS/run_cms.sh
|
||||
|
||||
exit 0' > /etc/rc.local
|
||||
#
|
||||
|
@ -92,7 +93,8 @@ sudo /root/monitor/setup/key.sh
|
|||
#
|
||||
#*************setup schedule crontab**********
|
||||
echo "setup schedule crontab"
|
||||
echo "33 3 * * * 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
|
||||
#
|
||||
#*************setup autologin***************
|
||||
echo "setup autologin"
|
||||
|
|
BIN
monitor/setup/winter.png
Normal file
BIN
monitor/setup/winter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 940 KiB |
Loading…
Reference in New Issue
Block a user