else
cmd_root="true"
+ # NB 23.04.18: TODEL
+ [ "$(git config --get remote.origin.url)" = "git@git.nbdom.net:root.git" ] && git remote set-url origin git.nbdom.net:/home/git/root.git
+ [ "$(git config --get remote.origin.url)" = "git@git.nbdom.net:nbdom.git" ] && git remote set-url origin git.nbdom.net:/home/git/nbdom.git
+ [ "$(git config --get remote.origin.url)" = "git@git.nbdom.net:pi.git" ] && git remote set-url origin git.nbdom.net:/home/git/pi.git
+
[ -x bin/$name-install ] && cmd_root="$cmd_root && echo ' >$name-install' && bin/$name-install|sed 's/^/ /'"
if [ "$cmd_root" != "true" ]; then
eval "$cmd_root"
set $_https_only 0;
if ( $scheme = http ) { set $_https_only 1; }
-# Live is behind a load balancer which do only http queries
-if ($http_x_forwarded_proto = "https") { set $_https_only 0; }
if ( $https_only = "") { set $https_only ""; }
if ( $https_only != "") { set $_https_only $https_only; }
+if ( $scheme = https ) { set $_https_only 0; }
+# Live is behind a load balancer which do only http queries
+if ($http_x_forwarded_proto = "https") { set $_https_only 0; }
+
if ( $_https_only = 1 ) { return 301 https://$host$request_uri; }
#if (isset($this->pdo_error)) $this->conn->setAttribute($this->pdo_error[0], $this->pdo_error[1]);
} catch (PDOException $e) {
- $msg = 'Connection failed:';
+ $msg = 'Database connection failed:';
foreach(['name','host','file'] as $p) {
if (!empty($this->$p)) $msg .= " $p=".$this->$p;