mod last 3 copies command
parent
9512bb4ba2
commit
706a502dc3
|
@ -223,7 +223,7 @@ ssh $server 'echo "$(tail -5 $remote_path/log)" > $remote_path/log'
|
|||
|
||||
# Необходимо хранить только последние 3 резервные копии
|
||||
count_copies=3
|
||||
ssh $server "find $remote_path -type f -name '*_image.img.gz' -printf '%T@ %p\n' | sort -n | cut -d' ' -f 2- | tail -n +$(($count_copies+1)) | xargs rm -f --"
|
||||
ssh $server "find $remote_path -type f -name '*_image.img.gz' -printf '%T@ %p\n' | sort -nr | cut -d' ' -f 2- | tail -n +$(($count_copies+1)) | xargs rm -f --"
|
||||
|
||||
# Необходимо переключить EEPROM на загрузку с SD карты
|
||||
rpi-eeprom-config -a $eeprom_conf_path/$eeprom_conf
|
||||
|
|
Loading…
Reference in New Issue