Skip to content

Commit

Permalink
2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertWojtowicz committed Nov 27, 2024
1 parent 9cfccef commit 4f1f761
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ $ /home/robert/export2garmin-master/import_data.sh
Export 2 Garmin Connect v2.4 (import_data.sh)
=============================================
18.07.2024-16:56:01 SYSTEM * Default path to temp.log file: /dev/shm/
18.07.2024-16:56:01 SYSTEM * Default path to export.lock and temp.log files: /dev/shm/
18.07.2024-16:56:01 SYSTEM * Default path to export2garmin.cfg and *_backup.csv files: /home/robert/export2garmin-master/user/
18.07.2024-16:56:01 SYSTEM * BLE adapter is ON in export2garmin.cfg file, check if available
18.07.2024-16:56:01 SYSTEM * BLE adapter hci0(00:00:00:00:00:00) working, check if temp.log file exists
Expand Down
8 changes: 4 additions & 4 deletions import_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ echo -e "=============================================\n"
timenow() {
date +%d.%m.%Y-%H:%M:%S
}
temp_path=/dev/shm/
remove_lock() {
rm -f "/dev/shm/export.lock"
rm -f "${temp_path}export.lock"
}
another_instance() {
echo "$(timenow) SYSTEM * Another import_data.sh instance running"
exit 1
}
lockfile -r 0 -l 60 "/dev/shm/export.lock" || another_instance
lockfile -r 0 -l 60 "${temp_path}export.lock" || another_instance
trap remove_lock EXIT

# Create a loop, "-l" parameter executes loop indefinitely
Expand All @@ -42,8 +43,7 @@ while [[ $loop_count -eq 0 ]] || [[ $i -lt $loop_count ]] ; do
fi

# Print location of variables for temp and user files
temp_path=/dev/shm/
echo "$(timenow) SYSTEM * Default path to temp.log file: $temp_path"
echo "$(timenow) SYSTEM * Default path to export.lock and temp.log files: $temp_path"
echo "$(timenow) SYSTEM * Default path to export2garmin.cfg and *_backup.csv files: $path/user/"

# Verifying correct working of BLE, restart bluetooth service and device via miscale_ble.py
Expand Down
2 changes: 1 addition & 1 deletion manuals/Miscale_BLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ $ /home/robert/export2garmin-master/import_data.sh
Export 2 Garmin Connect v2.4 (import_data.sh)
=============================================
18.07.2024-16:56:01 SYSTEM * Default path to temp.log file: /dev/shm/
18.07.2024-16:56:01 SYSTEM * Default path to export.lock and temp.log files: /dev/shm/
18.07.2024-16:56:01 SYSTEM * Default path to export2garmin.cfg and *_backup.csv files: /home/robert/export2garmin-master/user/
18.07.2024-16:56:01 SYSTEM * BLE adapter is ON in export2garmin.cfg file, check if available
18.07.2024-16:56:01 SYSTEM * BLE adapter hci0(00:00:00:00:00:00) working, check if /dev/shm/temp.log file exists
Expand Down
2 changes: 1 addition & 1 deletion manuals/Miscale_ESP32.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ $ /home/robert/export2garmin-master/import_data.sh
Export 2 Garmin Connect v2.3 (import_data.sh)
=============================================
18.07.2024-16:56:01 SYSTEM * Default path to temp.log file: /dev/shm/
18.07.2024-16:56:01 SYSTEM * Default path to export.lock and temp.log files: /dev/shm/
18.07.2024-16:56:01 SYSTEM * Default path to export2garmin.cfg and *_backup.csv files: /home/robert/export2garmin-master/user/
18.07.2024-16:56:01 SYSTEM * BLE adapter OFF or incorrect configuration in export2garmin.cfg file, check if temp.log file exists
18.07.2024-16:56:01 SYSTEM * temp.log file exists, go to modules
Expand Down
2 changes: 1 addition & 1 deletion manuals/Omron_BLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ $ /home/robert/export2garmin-master/import_data.sh
Export 2 Garmin Connect v2.4 (import_data.sh)
=============================================

18.07.2024-16:56:01 SYSTEM * Default path to temp.log file: /dev/shm/
18.07.2024-16:56:01 SYSTEM * Default path to export.lock and temp.log files: /dev/shm/
18.07.2024-16:56:01 SYSTEM * Default path to export2garmin.cfg and *_backup.csv files: /home/robert/export2garmin-master/user/
18.07.2024-16:56:01 SYSTEM * BLE adapter is ON in export2garmin.cfg file, check if available
18.07.2024-16:56:01 SYSTEM * BLE adapter hci0(00:00:00:00:00:00) working, check if temp.log file exists
Expand Down

0 comments on commit 4f1f761

Please sign in to comment.