Merge branch 'develop'

This commit is contained in:
cedricve
2015-05-23 17:10:03 +02:00
2 changed files with 12 additions and 12 deletions

View File

@@ -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

View File

@@ -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