From 711b3463532dc77472d395f7b8b9919436b83fcc Mon Sep 17 00:00:00 2001
From: Autodistries <autodistries@protonmail.com>
Date: Thu, 26 Sep 2024 15:31:43 +0200
Subject: [PATCH] restore custom net drivers

---
 files/positionGetter.sh                       | 30 +++++++++++++++++++
 playbooks/device_setup.yml                    |  2 +-
 .../microtask_network_drivers_update.yml      |  2 +-
 3 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100755 files/positionGetter.sh

diff --git a/files/positionGetter.sh b/files/positionGetter.sh
new file mode 100755
index 0000000..cc58e97
--- /dev/null
+++ b/files/positionGetter.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# run with arg 1 the sleep TO, and $2 the waiting time before doing things
+if [ $2 ]; then
+sleep $2
+fi
+
+rm ~/locations.log
+
+while echo $(pgrep -a "sniffer.py" >/dev/null; echo $?); do
+
+data=$(gpspipe --nmea -n 10 | awk -F, '$1 == "$GPGGA"' | awk -F, '{print $3, $5, $10}')
+# $GPGGA,124226.00,4842.8648,N,00212.3549,E,1,07,1.30,160.28,M,46.512,M,,*63
+# │ Latitude:         48.71441340 N           │
+# │ Longitude:         2.20591520 E           │
+# │ Alt (HAE, MSL):    206.490,    160.283 m
+
+echo $data >> ~/locations.log
+
+if [ $1 ]; then
+sleep $1
+else
+sleep 900 #15m
+fi
+
+done
+
+if [ $(ls ~/locations.log; echo $?) ]; do
+# faut moyenner toutes les potitions imo
+done
\ No newline at end of file
diff --git a/playbooks/device_setup.yml b/playbooks/device_setup.yml
index 6b77fd1..0e5e873 100644
--- a/playbooks/device_setup.yml
+++ b/playbooks/device_setup.yml
@@ -11,7 +11,7 @@
 
 
 
-# - import_playbook: ./microtask_network_drivers_update.yml
+- import_playbook: ./microtask_network_drivers_update.yml
 - import_playbook: ./microtask_networking_naming_scheme_udev_setup.yml
 - import_playbook: ./microtask_networkmanager_un_manager_setup.yml
 
diff --git a/playbooks/microtask_network_drivers_update.yml b/playbooks/microtask_network_drivers_update.yml
index c51bd0b..4333925 100644
--- a/playbooks/microtask_network_drivers_update.yml
+++ b/playbooks/microtask_network_drivers_update.yml
@@ -16,7 +16,7 @@
 
     - name: Clone or update rtl8188eus repository if necessary
       ansible.builtin.git:
-        repo: https://github.com/aircrack-ng/rtl8188eus/
+        repo: https://github.com/gglluukk/rtl8188eus/
         dest: ./rtl8188eus
         update: true
         clone: true
-- 
GitLab