]> _ Git - tortuga-home.git/commitdiff
.
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 7 Feb 2024 14:03:26 +0000 (15:03 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 7 Feb 2024 14:03:26 +0000 (15:03 +0100)
.docker/docker-compose.yml
.docker/dockerterminal.bat
.idea/php.xml
.idea/workspace.xml
bin/updatedns.bat
scripts/lib/heartbeats.php

index a63339ae3663a9b776a38e87264579b5d496b83f..2222e477db5b6116fabf6459976b4a34713fc5fc 100644 (file)
@@ -55,6 +55,8 @@ services:
             - '/dev/bus/usb:/dev/bus/usb'
             - './src/.docker/config/php/php.ini:/etc/php/7.4/fpm/conf.d/00-php-override.ini'
             - './src/.docker/config/php/fpm.conf:/etc/php/7.4/fpm/pool.d/zz-overrides.conf'
+        tmpfs:
+            - /tmp
         networks:
             - tortugahome
         extra_hosts:
index b7a7a2155231226b29f81b3307e0ac9f6de264b1..11ec46822a6172950d99dd69facea1331cffc77f 100644 (file)
@@ -1,3 +1,3 @@
 @echo off
 cls
-C:\tools\cygwin\bin\ssh.exe -tt root@192.168.13.6 'docker exec -it -u root tortugahome /bin/bash'
+C:\tools\cygwin\bin\ssh.exe -tt root@home.tortuga.enhydra.fr 'docker exec -it -u root tortugahome /bin/bash'
index 1c633bc7df46fb636ad103bc5b0c9ec94256ecab..0d655dc56872029fe08cb700f227890df7fbce7b 100644 (file)
   <component name="PhpProjectSharedConfiguration" php_language_level="7.3" />
   <component name="PhpUnit">
     <phpunit_settings>
-      <PhpUnitSettings load_method="CUSTOM_LOADER" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" />
+      <PhpUnitSettings custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" />
     </phpunit_settings>
   </component>
 </project>
\ No newline at end of file
index fd4f78e184dd8e518207e8af6998198a8678f5f5..d88927bc593233740dc35a4e4fb0364370d10e7e 100644 (file)
@@ -5,7 +5,12 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+      <change beforePath="$PROJECT_DIR$/.docker/docker-compose.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.docker/docker-compose.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.docker/dockerterminal.bat" beforeDir="false" afterPath="$PROJECT_DIR$/.docker/dockerterminal.bat" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/php.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/bin/updatedns.bat" beforeDir="false" afterPath="$PROJECT_DIR$/bin/updatedns.bat" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/heartbeats.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/heartbeats.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="hideEmptyMiddlePackages" value="true" />
     <option name="showLibraryContents" value="true" />
   </component>
-  <component name="PropertiesComponent">{
-  &quot;keyToString&quot;: {
-    &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
-    &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
-    &quot;Shell Script.Docker terminal.executor&quot;: &quot;Run&quot;,
-    &quot;WebServerToolWindowFactoryState&quot;: &quot;true&quot;,
-    &quot;WebServerToolWindowPanel.toolwindow.highlight.mappings&quot;: &quot;true&quot;,
-    &quot;WebServerToolWindowPanel.toolwindow.highlight.symlinks&quot;: &quot;true&quot;,
-    &quot;WebServerToolWindowPanel.toolwindow.show.date&quot;: &quot;false&quot;,
-    &quot;WebServerToolWindowPanel.toolwindow.show.permissions&quot;: &quot;false&quot;,
-    &quot;WebServerToolWindowPanel.toolwindow.show.size&quot;: &quot;false&quot;,
-    &quot;deletionFromPopupRequiresConfirmation&quot;: &quot;false&quot;,
-    &quot;git-widget-placeholder&quot;: &quot;master&quot;,
-    &quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;,
-    &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
-    &quot;last_opened_file_path&quot;: &quot;D:/Works/rodadocavaco&quot;,
-    &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
-    &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
-    &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
-    &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
-    &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
-    &quot;project.structure.last.edited&quot;: &quot;Project&quot;,
-    &quot;project.structure.proportion&quot;: &quot;0.0&quot;,
-    &quot;project.structure.side.proportion&quot;: &quot;0.2&quot;,
-    &quot;ruby.rails.projectView.checked&quot;: &quot;true&quot;,
-    &quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
-    &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "RunOnceActivity.OpenProjectViewOnStart": "true",
+    "RunOnceActivity.ShowReadmeOnStart": "true",
+    "Shell Script.Docker terminal.executor": "Run",
+    "Shell Script.Update DNS.executor": "Run",
+    "WebServerToolWindowFactoryState": "true",
+    "WebServerToolWindowPanel.toolwindow.highlight.mappings": "true",
+    "WebServerToolWindowPanel.toolwindow.highlight.symlinks": "true",
+    "WebServerToolWindowPanel.toolwindow.show.date": "false",
+    "WebServerToolWindowPanel.toolwindow.show.permissions": "false",
+    "WebServerToolWindowPanel.toolwindow.show.size": "false",
+    "deletionFromPopupRequiresConfirmation": "false",
+    "git-widget-placeholder": "master",
+    "ignore.virus.scanning.warn.message": "true",
+    "kotlin-language-version-configured": "true",
+    "last_opened_file_path": "D:/Works/rodadocavaco",
+    "node.js.detected.package.eslint": "true",
+    "node.js.detected.package.tslint": "true",
+    "node.js.selected.package.eslint": "(autodetect)",
+    "node.js.selected.package.tslint": "(autodetect)",
+    "nodejs_package_manager_path": "npm",
+    "project.structure.last.edited": "Project",
+    "project.structure.proportion": "0.0",
+    "project.structure.side.proportion": "0.2",
+    "ruby.rails.projectView.checked": "true",
+    "settings.editor.selected.configurable": "preferences.pluginManager",
+    "vue.rearranger.settings.migration": "true"
   }
-}</component>
+}]]></component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
       <recent name="D:\Works\tortuga-home\scripts" />
       <recent name="T:\Drive\Works\home\images\rooms" />
     </key>
   </component>
-  <component name="RunManager" selected="Shell Script.Docker terminal">
+  <component name="RunManager" selected="Shell Script.Update DNS">
     <configuration default="true" type="Applet">
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
       <method v="2">
       <workItem from="1704125893623" duration="836000" />
       <workItem from="1704215960754" duration="1064000" />
       <workItem from="1704879857290" duration="190000" />
-      <workItem from="1707238767637" duration="48000" />
+      <workItem from="1707238767637" duration="1470000" />
+      <workItem from="1707311861067" duration="2556000" />
     </task>
     <task id="LOCAL-00502" summary=".">
       <created>1641726946298</created>
       <option name="project" value="LOCAL" />
       <updated>1687259667913</updated>
     </task>
-    <option name="localTasksCounter" value="603" />
+    <option name="localTasksCounter" value="604" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index 186796b8a6f261869e1ec527836321d7ac4846bc..5e56252fc09d59b140ccd628ec43f6449d9df3a7 100644 (file)
@@ -1,5 +1,4 @@
 @echo off
-C:\tools\cygwin\bin\ssh.exe -tt root@192.168.13.6 '/usr/local/bin/updatedns'
-C:\tools\cygwin\bin\ssh.exe -tt root@192.168.13.7 '/usr/local/bin/updatedns'
+C:\tools\cygwin\bin\ssh.exe -tt root@192.168.13.66 '/usr/local/bin/updatedns'
 C:\tools\cygwin\bin\ssh.exe -tt root@192.168.13.64 '/usr/local/bin/updatedns'
 C:\tools\cygwin\bin\ssh.exe -tt root@192.168.13.67 '/usr/local/bin/updatedns'
\ No newline at end of file
index f36a4913be9f456f528fd988cad254cff594106f..df3c38b2056940f805a802f46f3738ada44ed6e8 100644 (file)
@@ -25,7 +25,8 @@ function isAlive($device)
 
 function checkDevicesAlive()
 {
-    $devices = ['litvincent', 'litjerome', 'bureausun', 'entree', 'sdb', 'cuisine', 'chambre'];
+    $devices = ['litvincent', 'litjerome', 'bureausun', /*'entree',*/
+        'sdb', 'cuisine', 'chambre'];
     header('Content-Type: text/plain');
     foreach ($devices as $device) {
         echo $device . ':' . isAlive($device) . '(' . getState('heartbeat_' . $device) . ')' . "\n";
@@ -39,7 +40,7 @@ function restartDeadDevices()
         'litjerome' => ['room' => 'chambre', 'type' => 'rpi', 'eco' => false],
         'chambre' => ['room' => 'chambre', 'type' => 'rpi', 'eco' => false],
         'bureausun' => ['room' => 'bureau', 'type' => 'rpi', 'eco' => false],
-        'entree' => ['room' => 'entree', 'type' => 'rpi', 'eco' => true],
+        'entree' => ['room' => 'entree', 'type' => 'rpi-no-reboot', 'eco' => false],
         'cuisine' => ['room' => 'cuisine', 'type' => 'android', 'eco' => true],
         'salon' => ['room' => 'salon', 'type' => 'android', 'eco' => true],
         'sdb' => ['room' => 'sdb', 'type' => 'android', 'eco' => true],
@@ -60,7 +61,7 @@ function restartDeadDevices()
         if ($infos['type'] === 'android') {
             phoneTask('Tortuga', $device);
             echo 'Restart android app on ' . $device . "\n";
-        } else {
+        } else if ($infos['type'] === 'rpi') {
             if ($alive === 0 || getNightMode($device)) {
                 sshCommand('/usr/local/bin/tortugahome', $device, false, true);
                 echo 'Restart kiosk chrome on ' . $device . "\n";
@@ -68,6 +69,11 @@ function restartDeadDevices()
                 sshCommand('/sbin/reboot now', $device, false, true);
                 echo 'Reboot rpi ' . $device . "\n";
             }
+        } else if ($infos['type'] === 'rpi-no-reboot') {
+            if ($alive <= 0 || getNightMode($device)) {
+                sshCommand('/usr/local/bin/tortugahome', $device, false, true);
+                echo 'Restart kiosk chrome on ' . $device . "\n";
+            }
         }
     }
 }
\ No newline at end of file