Skip to content

Commit af7063f

Browse files
committed
Fix 'List backups' exiting script when no backups exist (#57)
1 parent dbec69c commit af7063f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mtproxymax.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5846,7 +5846,7 @@ restore_backup() {
58465846

58475847
list_backups() {
58485848
mkdir -p "$BACKUP_DIR"
5849-
local files; files=$(ls -1t "${BACKUP_DIR}"/mtproxymax-*.tar.gz 2>/dev/null)
5849+
local files; files=$(ls -1t "${BACKUP_DIR}"/mtproxymax-*.tar.gz 2>/dev/null) || true
58505850
if [ -z "$files" ]; then
58515851
log_info "No backups found in ${BACKUP_DIR}"
58525852
return

0 commit comments

Comments
 (0)