From 2a0a37b9cfe54e8bb9653db04993c22b048ed351 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Thu, 20 May 2021 10:17:25 +0000 Subject: [PATCH] Fix issues found during testing. Change filename of output file. #568 --- utils/get_warranty_serial/get_serials.php | 2 +- utils/warranty_motiv_dev.sh | 3 ++- utils/warranty_motiv_prod.sh | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/utils/get_warranty_serial/get_serials.php b/utils/get_warranty_serial/get_serials.php index ffdfe49d..237ce266 100644 --- a/utils/get_warranty_serial/get_serials.php +++ b/utils/get_warranty_serial/get_serials.php @@ -33,7 +33,7 @@ try { $res = $blob_client->getBlob('warranty', $filename); // print_r($res); - file_put_contents("/tmp/output.txt", $res->getContentStream()); + file_put_contents("/tmp/warranty_download_serial.txt", $res->getContentStream()); } catch (Exception $e) { file_put_contents("/tmp/serial_download_error.txt", $filename . "\n" . $e->getMessage() . "\n" . "\n", FILE_APPEND); } diff --git a/utils/warranty_motiv_dev.sh b/utils/warranty_motiv_dev.sh index bed9535f..00c73418 100755 --- a/utils/warranty_motiv_dev.sh +++ b/utils/warranty_motiv_dev.sh @@ -1,3 +1,4 @@ #!/bin/bash +touch /tmp/warranty_download_serial.txt /usr/bin/php /usr/share/nginx/html/resqapi/utils/get_warranty_serial/get_serials.php -/usr/bin/php /usr/share/nginx/html/resqapi/utils/load_warranty_serial/load_serials.php /tmp/output.txt "mysql:host=localhost;dbname=resq;charset=UTF8" resq Motolite456 +/usr/bin/php /usr/share/nginx/html/resqapi/utils/load_warranty_serial/load_serials.php /tmp/warranty_download_serial.txt "mysql:host=localhost;dbname=resq;charset=UTF8" resq Motolite456 diff --git a/utils/warranty_motiv_prod.sh b/utils/warranty_motiv_prod.sh index 0c920200..f13a7d7d 100755 --- a/utils/warranty_motiv_prod.sh +++ b/utils/warranty_motiv_prod.sh @@ -1,3 +1,4 @@ #!/bin/bash +touch /tmp/warranty_download_serial.txt /usr/bin/php /var/www/resq/utils/get_warranty_serial/get_serials.php -/usr/bin/php /var/www/resq/utils/load_warranty_serial/load_serials.php /tmp/output.txt "mysql:host=localhost;dbname=resq;charset=UTF8" resq Motolite456 +/usr/bin/php /var/www/resq/utils/load_warranty_serial/load_serials.php /tmp/warranty_download_serial.txt "mysql:host=172.18.203.191:3306;dbname=resq;charset=UTF8" resq Motolite456