File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -244,11 +244,16 @@ Copy paste the bash script
244
244
################################################################
245
245
# Check if memory is more than 70%, if so refresh nodejs scripts
246
246
##
247
- if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }' | echo $0 ) > 70.0 ]];
247
+ if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }') > 70.0 ]];
248
248
then
249
249
/usr/bin/forever restartall ;
250
250
fi;
251
251
252
+ #############################################
253
+ # Only keep images of last 3 days on sd-card.
254
+ ##
255
+ find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
256
+
252
257
##############################################################
253
258
# Check if disk size is more than 95%, if so remove some files
254
259
# from the capture directory.
@@ -258,11 +263,6 @@ Copy paste the bash script
258
263
rm -f $( ls -d -1tr /home/kerberos-web/public/capture/* | head -n 500);
259
264
fi;
260
265
261
- #############################################
262
- # Only keep images of last 3 days on sd-card.
263
- ##
264
- find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
265
-
266
266
Give rights to bash script
267
267
268
268
chmod +x /home/bash/run.sh
Original file line number Diff line number Diff line change @@ -244,11 +244,16 @@ Copy paste the bash script
244
244
################################################################
245
245
# Check if memory is more than 70%, if so refresh nodejs scripts
246
246
##
247
- if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }' | echo $0 ) > 70.0 ]];
247
+ if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }') > 70.0 ]];
248
248
then
249
249
/usr/bin/forever restartall ;
250
250
fi;
251
251
252
+ #############################################
253
+ # Only keep images of last 3 days on sd-card.
254
+ ##
255
+ find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
256
+
252
257
##############################################################
253
258
# Check if disk size is more than 95%, if so remove some files
254
259
# from the capture directory.
@@ -258,11 +263,6 @@ Copy paste the bash script
258
263
rm -f $( ls -d -1tr /home/kerberos-web/public/capture/* | head -n 500);
259
264
fi;
260
265
261
- #############################################
262
- # Only keep images of last 3 days on sd-card.
263
- ##
264
- find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
265
-
266
266
Give rights to bash script
267
267
268
268
chmod +x /home/bash/run.sh
You can’t perform that action at this time.
0 commit comments