mirror of
https://github.com/kerberos-io/documentation.git
synced 2026-08-23 15:18:31 +00:00
Merge branch 'develop'
This commit is contained in:
@@ -244,11 +244,16 @@ Copy paste the bash script
|
||||
################################################################
|
||||
# Check if memory is more than 70%, if so refresh nodejs scripts
|
||||
##
|
||||
if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }' | echo $0 ) > 70.0 ]];
|
||||
if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }') > 70.0 ]];
|
||||
then
|
||||
/usr/bin/forever restartall ;
|
||||
fi;
|
||||
|
||||
#############################################
|
||||
# Only keep images of last 3 days on sd-card.
|
||||
##
|
||||
find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
|
||||
|
||||
##############################################################
|
||||
# Check if disk size is more than 95%, if so remove some files
|
||||
# from the capture directory.
|
||||
@@ -258,11 +263,6 @@ Copy paste the bash script
|
||||
rm -f $( ls -d -1tr /home/kerberos-web/public/capture/* | head -n 500);
|
||||
fi;
|
||||
|
||||
#############################################
|
||||
# Only keep images of last 3 days on sd-card.
|
||||
##
|
||||
find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
|
||||
|
||||
Give rights to bash script
|
||||
|
||||
chmod +x /home/bash/run.sh
|
||||
|
||||
12
dev/5_FAQ.md
12
dev/5_FAQ.md
@@ -244,11 +244,16 @@ Copy paste the bash script
|
||||
################################################################
|
||||
# Check if memory is more than 70%, if so refresh nodejs scripts
|
||||
##
|
||||
if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }' | echo $0 ) > 70.0 ]];
|
||||
if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }') > 70.0 ]];
|
||||
then
|
||||
/usr/bin/forever restartall ;
|
||||
fi;
|
||||
|
||||
#############################################
|
||||
# Only keep images of last 3 days on sd-card.
|
||||
##
|
||||
find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
|
||||
|
||||
##############################################################
|
||||
# Check if disk size is more than 95%, if so remove some files
|
||||
# from the capture directory.
|
||||
@@ -258,11 +263,6 @@ Copy paste the bash script
|
||||
rm -f $( ls -d -1tr /home/kerberos-web/public/capture/* | head -n 500);
|
||||
fi;
|
||||
|
||||
#############################################
|
||||
# Only keep images of last 3 days on sd-card.
|
||||
##
|
||||
find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
|
||||
|
||||
Give rights to bash script
|
||||
|
||||
chmod +x /home/bash/run.sh
|
||||
|
||||
Reference in New Issue
Block a user