update
This commit is contained in:
parent
ed61de0b10
commit
23affef16d
|
@ -5,13 +5,13 @@ folder="/home/pi/mp4"
|
|||
|
||||
# 获取文件夹的大小
|
||||
size=$(du -sh "$folder" | awk '{print int($1/1024/1024)}')
|
||||
while [[ $size -gt 22 ]]
|
||||
while [[ $size -gt 20 ]]
|
||||
do
|
||||
# 获取最早创建的文件
|
||||
oldest_file=$(ls -tr | head -1 | xargs)
|
||||
rm -f $oldest_file
|
||||
size=$(du -sh "$folder" | awk '{print int($1/1024/1024)}')
|
||||
if [[ $size -le 22 ]]
|
||||
if [[ $size -le 20 ]]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -37,4 +37,4 @@ stopsignal=TERM
|
|||
stopasgroup=True
|
||||
priority=1
|
||||
[include]
|
||||
files = /home/pi/lot_manager/conf/*.conf
|
||||
files = /etc/supervisor/conf.d/*.conf
|
||||
|
|
Loading…
Reference in New Issue