From: Vincent Date: Wed, 2 Jun 2021 20:06:59 +0000 (+0200) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6c45aaf54e0db940ea9cadabe973c76f05cdd9e5;p=tortuga-home.git . --- diff --git a/.htaccess b/.htaccess index 7209fe2..d846696 100644 --- a/.htaccess +++ b/.htaccess @@ -32,7 +32,7 @@ Require ip 192.168.1.0/24 192.168.13.0/24 127.0.0.0/8 88.190.245.49 192.168.17.0 RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] - sRewriteRule ^apk(.*)$ app/build/outputs/apk/debug/app-debug.apk [F] + RewriteRule ^apk(.*)$ app/build/outputs/apk/debug/app-debug.apk [F] RewriteRule ^s$ https://salon.home.tortuga.enhydra.fr/ [L,R=301] RewriteRule ^b$ https://bureau.home.tortuga.enhydra.fr/ [L,R=301] diff --git a/.idea/deployment.xml b/.idea/deployment.xml index 7f0eabe..7f84bf7 100644 --- a/.idea/deployment.xml +++ b/.idea/deployment.xml @@ -2,11 +2,28 @@ + + + + + + + + + + + + + + + + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 6866222..364a417 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,10 +2,15 @@ + + - - - + + + + + + diff --git a/config/tv.php b/config/tv.php index d80c457..e3b7842 100644 --- a/config/tv.php +++ b/config/tv.php @@ -2,7 +2,7 @@ $mapdvb = connectRedis()->igbget('dvbchannels'); if (!$mapdvb) { $mapdvb = array(); - $m3u = getUrlContent('http://192.168.13.60:9981/playlist/channels', 30); + $m3u = getUrlContent('http://tvheadend.home.tortuga.enhydra.fr:9981/playlist/channels', 30); $lines = explode("\n", $m3u); $name = ''; foreach ($lines as $line) { diff --git a/scripts/lib/domoticz.php b/scripts/lib/domoticz.php index ea9c6ef..f8548ca 100644 --- a/scripts/lib/domoticz.php +++ b/scripts/lib/domoticz.php @@ -6,7 +6,7 @@ function runDomoticzCommand($params) unset($params['delay']); - $ip = '192.168.13.60'; + $ip = 'domoticz.home.tortuga.enhydra.fr'; return httpRequest('http://' . $ip . ':8084/json.htm', 'GET', $params); } diff --git a/scripts/lib/ssh.php b/scripts/lib/ssh.php index 429dfd9..acbfb0a 100644 --- a/scripts/lib/ssh.php +++ b/scripts/lib/ssh.php @@ -40,14 +40,15 @@ function getSSHInstance($device = null, $sudo = false, $force = false) function sshCommand($command, $device = null, $blocking = true, $sudo = false) { return sshRunCommand($command, $device, $blocking, $sudo); - $redis = connectRedis(); - $queue = $redis->igbget('ssh_queue'); - if (!is_array($queue)) { - $queue = []; - } - $queue[] = ['command' => $command, 'device' => $device, 'blocking' => $blocking, 'sudo' => $sudo]; - $redis->igbset('ssh_queue', $queue); - $redis->publish('ssh_event', 'handle_queue'); +// $redis = connectRedis(); +// $queue = $redis->igbget('ssh_queue'); +// if (!is_array($queue)) { +// $queue = []; +// } +// $queue[] = ['command' => $command, 'device' => $device, 'blocking' => $blocking, 'sudo' => $sudo]; +// $redis->igbset('ssh_queue', $queue); +// $redis->publish('ssh_event', 'handle_queue'); +// } function sshRunCommand($command, $device = null, $blocking = true, $sudo = false) @@ -78,4 +79,4 @@ function sshRunCommand($command, $device = null, $blocking = true, $sudo = false $res = array('cmd' => $command, 'device' => $device, 'error' => 'no device'); } return $res; -} +} \ No newline at end of file diff --git a/servers/startdaemon b/servers/startdaemon index 3b74ad6..26d318b 100644 --- a/servers/startdaemon +++ b/servers/startdaemon @@ -1,2 +1,2 @@ #!/bin/sh -/sbin/start-stop-daemon --start --quiet --user pi --chuid pi --name home-$1 --make-pidfile --pidfile /var/run/home-$1.pid --background --startas /bin/bash -- -c "exec /var/www/home/servers/_startdaemon.php $1" \ No newline at end of file +/sbin/start-stop-daemon --start --quiet --user tortugahome --chuid tortugahome --name home-$1 --make-pidfile --pidfile /var/run/home-$1.pid --background --startas /bin/bash -- -c "exec /var/www/home/servers/_startdaemon.php $1" \ No newline at end of file diff --git a/servers/startserver b/servers/startserver deleted file mode 100644 index ac9a70e..0000000 --- a/servers/startserver +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd /var/www/home -php -S 192.168.13.60:$2 "/var/www/home" >> "/var/log/home/$1.log" \ No newline at end of file diff --git a/servers/stopserver b/servers/stopserver deleted file mode 100644 index 75a10d2..0000000 --- a/servers/stopserver +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/php -