From 1bf2c70549220ef65526f330e68e4ebdddaf7fde Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Thu, 9 Apr 2020 22:59:17 +0100
Subject: [PATCH] FEAT #13679 TIME 0:20 refactoring notification in bin folder

---
 .../batch => bin/notification}/basket_event_stack.php      | 0
 .../batch => bin/notification}/batch_tools.php             | 0
 .../batch => bin/notification}/config/config.xml.default   | 0
 .../batch => bin/notification}/load_basket_event_stack.php | 0
 .../notification}/load_process_email_stack.php             | 0
 .../notification}/load_process_event_stack.php             | 0
 .../notification}/load_stack_letterbox_alerts.php          | 0
 .../batch => bin/notification}/process_email_stack.php     | 0
 .../batch => bin/notification}/process_event_stack.php     | 0
 bin/notification/scripts/BASKETS.sh                        | 3 +++
 bin/notification/scripts/nct-ncc-and-anc.sh                | 6 ++++++
 bin/notification/scripts/ret1-ret2.sh                      | 6 ++++++
 bin/notification/scripts/sendmail.sh                       | 4 ++++
 .../batch => bin/notification}/stack_letterbox_alerts.php  | 0
 .../notifications/batch/logs/process_email_stack/.gitkeep  | 0
 .../notifications/batch/logs/process_event_stack/.gitkeep  | 0
 .../batch/logs/process_letterbox_alerts/.gitkeep           | 0
 modules/notifications/batch/scripts/BASKETS.sh             | 4 ----
 modules/notifications/batch/scripts/nct-ncc-and-anc.sh     | 7 -------
 modules/notifications/batch/scripts/ret1-ret2.sh           | 7 -------
 modules/notifications/batch/scripts/sendmail.sh            | 5 -----
 modules/notifications/batch/tmp/test.txt                   | 0
 22 files changed, 19 insertions(+), 23 deletions(-)
 rename {modules/notifications/batch => bin/notification}/basket_event_stack.php (100%)
 mode change 100755 => 100644
 rename {modules/notifications/batch => bin/notification}/batch_tools.php (100%)
 mode change 100755 => 100644
 rename {modules/notifications/batch => bin/notification}/config/config.xml.default (100%)
 mode change 100755 => 100644
 rename {modules/notifications/batch => bin/notification}/load_basket_event_stack.php (100%)
 mode change 100755 => 100644
 rename {modules/notifications/batch => bin/notification}/load_process_email_stack.php (100%)
 mode change 100755 => 100644
 rename {modules/notifications/batch => bin/notification}/load_process_event_stack.php (100%)
 mode change 100755 => 100644
 rename {modules/notifications/batch => bin/notification}/load_stack_letterbox_alerts.php (100%)
 mode change 100755 => 100644
 rename {modules/notifications/batch => bin/notification}/process_email_stack.php (100%)
 mode change 100755 => 100644
 rename {modules/notifications/batch => bin/notification}/process_event_stack.php (100%)
 mode change 100755 => 100644
 create mode 100755 bin/notification/scripts/BASKETS.sh
 create mode 100755 bin/notification/scripts/nct-ncc-and-anc.sh
 create mode 100755 bin/notification/scripts/ret1-ret2.sh
 create mode 100755 bin/notification/scripts/sendmail.sh
 rename {modules/notifications/batch => bin/notification}/stack_letterbox_alerts.php (100%)
 mode change 100755 => 100644
 delete mode 100755 modules/notifications/batch/logs/process_email_stack/.gitkeep
 delete mode 100755 modules/notifications/batch/logs/process_event_stack/.gitkeep
 delete mode 100755 modules/notifications/batch/logs/process_letterbox_alerts/.gitkeep
 delete mode 100644 modules/notifications/batch/scripts/BASKETS.sh
 delete mode 100755 modules/notifications/batch/scripts/nct-ncc-and-anc.sh
 delete mode 100755 modules/notifications/batch/scripts/ret1-ret2.sh
 delete mode 100755 modules/notifications/batch/scripts/sendmail.sh
 delete mode 100755 modules/notifications/batch/tmp/test.txt

diff --git a/modules/notifications/batch/basket_event_stack.php b/bin/notification/basket_event_stack.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/notifications/batch/basket_event_stack.php
rename to bin/notification/basket_event_stack.php
diff --git a/modules/notifications/batch/batch_tools.php b/bin/notification/batch_tools.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/notifications/batch/batch_tools.php
rename to bin/notification/batch_tools.php
diff --git a/modules/notifications/batch/config/config.xml.default b/bin/notification/config/config.xml.default
old mode 100755
new mode 100644
similarity index 100%
rename from modules/notifications/batch/config/config.xml.default
rename to bin/notification/config/config.xml.default
diff --git a/modules/notifications/batch/load_basket_event_stack.php b/bin/notification/load_basket_event_stack.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/notifications/batch/load_basket_event_stack.php
rename to bin/notification/load_basket_event_stack.php
diff --git a/modules/notifications/batch/load_process_email_stack.php b/bin/notification/load_process_email_stack.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/notifications/batch/load_process_email_stack.php
rename to bin/notification/load_process_email_stack.php
diff --git a/modules/notifications/batch/load_process_event_stack.php b/bin/notification/load_process_event_stack.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/notifications/batch/load_process_event_stack.php
rename to bin/notification/load_process_event_stack.php
diff --git a/modules/notifications/batch/load_stack_letterbox_alerts.php b/bin/notification/load_stack_letterbox_alerts.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/notifications/batch/load_stack_letterbox_alerts.php
rename to bin/notification/load_stack_letterbox_alerts.php
diff --git a/modules/notifications/batch/process_email_stack.php b/bin/notification/process_email_stack.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/notifications/batch/process_email_stack.php
rename to bin/notification/process_email_stack.php
diff --git a/modules/notifications/batch/process_event_stack.php b/bin/notification/process_event_stack.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/notifications/batch/process_event_stack.php
rename to bin/notification/process_event_stack.php
diff --git a/bin/notification/scripts/BASKETS.sh b/bin/notification/scripts/BASKETS.sh
new file mode 100755
index 00000000000..3ff53615b55
--- /dev/null
+++ b/bin/notification/scripts/BASKETS.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+eventStackPath='/var/www/html/MaarchCourrier/bin/notification/basket_event_stack.php'
+php $eventStackPath -c /var/www/html/MaarchCourrier/bin/notification/config/config.xml -n BASKETS
\ No newline at end of file
diff --git a/bin/notification/scripts/nct-ncc-and-anc.sh b/bin/notification/scripts/nct-ncc-and-anc.sh
new file mode 100755
index 00000000000..3bad6f66ce5
--- /dev/null
+++ b/bin/notification/scripts/nct-ncc-and-anc.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+eventStackPath='/var/www/html/MaarchCourrier/bin/notification/process_event_stack.php'
+php $eventStackPath -c /var/www/html/MaarchCourrier/bin/notification/config/config.xml -n NCC
+php $eventStackPath -c /var/www/html/MaarchCourrier/bin/notification/config/config.xml -n ANC
+php $eventStackPath -c /var/www/html/MaarchCourrier/bin/notification/config/config.xml -n AND
+php $eventStackPath -c /var/www/html/MaarchCourrier/bin/notification/config/config.xml -n RED
diff --git a/bin/notification/scripts/ret1-ret2.sh b/bin/notification/scripts/ret1-ret2.sh
new file mode 100755
index 00000000000..5a24d960442
--- /dev/null
+++ b/bin/notification/scripts/ret1-ret2.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+mlbStackPath='/var/www/html/MaarchCourrier/bin/notification/stack_letterbox_alerts.php'
+eventStackPath='/var/www/html/MaarchCourrier/bin/notification/process_event_stack.php'
+php $mlbStackPath   -c /var/www/html/MaarchCourrier/bin/notification/config/config.xml 
+php $eventStackPath -c /var/www/html/MaarchCourrier/bin/notification/config/config.xml -n RET1
+php $eventStackPath -c /var/www/html/MaarchCourrier/bin/notification/config/config.xml -n RET2
diff --git a/bin/notification/scripts/sendmail.sh b/bin/notification/scripts/sendmail.sh
new file mode 100755
index 00000000000..d6902e1a6be
--- /dev/null
+++ b/bin/notification/scripts/sendmail.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+emailStackPath='/var/www/html/MaarchCourrier/bin/notification/process_email_stack.php'
+php $emailStackPath -c /var/www/html/MaarchCourrier/bin/notification/config/config.xml
+
diff --git a/modules/notifications/batch/stack_letterbox_alerts.php b/bin/notification/stack_letterbox_alerts.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/notifications/batch/stack_letterbox_alerts.php
rename to bin/notification/stack_letterbox_alerts.php
diff --git a/modules/notifications/batch/logs/process_email_stack/.gitkeep b/modules/notifications/batch/logs/process_email_stack/.gitkeep
deleted file mode 100755
index e69de29bb2d..00000000000
diff --git a/modules/notifications/batch/logs/process_event_stack/.gitkeep b/modules/notifications/batch/logs/process_event_stack/.gitkeep
deleted file mode 100755
index e69de29bb2d..00000000000
diff --git a/modules/notifications/batch/logs/process_letterbox_alerts/.gitkeep b/modules/notifications/batch/logs/process_letterbox_alerts/.gitkeep
deleted file mode 100755
index e69de29bb2d..00000000000
diff --git a/modules/notifications/batch/scripts/BASKETS.sh b/modules/notifications/batch/scripts/BASKETS.sh
deleted file mode 100644
index 606287e7330..00000000000
--- a/modules/notifications/batch/scripts/BASKETS.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-eventStackPath='/var/www/html/MaarchCourrier/modules/notifications/batch/basket_event_stack.php'
-cd /var/www/html/MaarchCourrier/modules/notifications/batch/
-php $eventStackPath -c /var/www/html/MaarchCourrier/modules/notifications/batch/config/config.xml -n BASKETS
\ No newline at end of file
diff --git a/modules/notifications/batch/scripts/nct-ncc-and-anc.sh b/modules/notifications/batch/scripts/nct-ncc-and-anc.sh
deleted file mode 100755
index b9e0702a06d..00000000000
--- a/modules/notifications/batch/scripts/nct-ncc-and-anc.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-eventStackPath='/var/www/html/MaarchCourrier/modules/notifications/batch/process_event_stack.php'
-cd /var/www/html/MaarchCourrier/modules/notifications/batch/
-php $eventStackPath -c /var/www/html/MaarchCourrier/modules/notifications/batch/config/config.xml -n NCC
-php $eventStackPath -c /var/www/html/MaarchCourrier/modules/notifications/batch/config/config.xml -n ANC
-php $eventStackPath -c /var/www/html/MaarchCourrier/modules/notifications/batch/config/config.xml -n AND
-php $eventStackPath -c /var/www/html/MaarchCourrier/modules/notifications/batch/config/config.xml -n RED
diff --git a/modules/notifications/batch/scripts/ret1-ret2.sh b/modules/notifications/batch/scripts/ret1-ret2.sh
deleted file mode 100755
index f9bc42ffcd0..00000000000
--- a/modules/notifications/batch/scripts/ret1-ret2.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-mlbStackPath='/var/www/html/MaarchCourrier/modules/notifications/batch/stack_letterbox_alerts.php'
-eventStackPath='/var/www/html/MaarchCourrier/modules/notifications/batch/process_event_stack.php'
-cd  /var/www/html/MaarchCourrier/modules/notifications/batch/
-php $mlbStackPath   -c /var/www/html/MaarchCourrier/modules/notifications/batch/config/config.xml 
-php $eventStackPath -c /var/www/html/MaarchCourrier/modules/notifications/batch/config/config.xml -n RET1
-php $eventStackPath -c /var/www/html/MaarchCourrier/modules/notifications/batch/config/config.xml -n RET2
diff --git a/modules/notifications/batch/scripts/sendmail.sh b/modules/notifications/batch/scripts/sendmail.sh
deleted file mode 100755
index d3771b1f0bc..00000000000
--- a/modules/notifications/batch/scripts/sendmail.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-cd /var/www/html/MaarchCourrier/modules/notifications/batch/
-emailStackPath='/var/www/html/MaarchCourrier/modules/notifications/batch/process_email_stack.php'
-php $emailStackPath -c /var/www/html/MaarchCourrier/modules/notifications/batch/config/config.xml
-
diff --git a/modules/notifications/batch/tmp/test.txt b/modules/notifications/batch/tmp/test.txt
deleted file mode 100755
index e69de29bb2d..00000000000
-- 
GitLab