Modifications : etc/nginx/org/heureux-cyclage/install
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Fri, 20 Mar 2015 17:53:38 +0000 (18:53 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Fri, 20 Mar 2015 17:53:38 +0000 (18:53 +0100)
17 files changed:
lib/tool/admin
srv/ateliers/etc/nginx/org/heureux-cyclage/install
srv/ateliers/etc/nginx/org/heureux-cyclage/www/common.conf.m4
srv/ateliers/etc/nginx/org/heureux-cyclage/www/install [changed from symlink to file mode: 0755]
srv/ateliers/etc/nginx/org/heureux-cyclage/www/server.conf.m4
srv/ateliers/sys/mysql/... [new symlink]
srv/ateliers/sys/mysql/user [new file with mode: 0644]
srv/ateliers/sys/nginx/log/... [new symlink]
srv/ateliers/sys/nginx/log/home [new file with mode: 0644]
srv/ateliers/sys/nginx/log/user [new file with mode: 0644]
srv/ateliers/sys/nginx/org/heureux-cyclage/www/home
srv/ateliers/sys/php5/... [new symlink]
srv/ateliers/sys/php5/fpm/... [new symlink]
srv/ateliers/sys/php5/fpm/org/... [new symlink]
srv/ateliers/sys/php5/fpm/org/heureux-cyclage/... [new symlink]
srv/ateliers/sys/php5/fpm/org/heureux-cyclage/www/... [new symlink]
srv/ateliers/sys/php5/fpm/org/heureux-cyclage/www/pool [new file with mode: 0644]

index 9678e3a..ebe4b43 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 9678e3aa85ca152f6f9e5a6e16d1abaf3479b120
+Subproject commit ebe4b43bce57629859ae1b2d30d244679719ae96
index 97a4a5a..40857f4 100755 (executable)
@@ -3,9 +3,8 @@
 # DESCRIPTION: install
 
 # ACTION: initialize from ./
-       test -L "$0" && tool="$(readlink -e "$0")" || tool=$0
-       tool=$(readlink -e "${tool%/*}"/...)
-       . "$tool"/lib/tool/admin/lib/install.sh
+       tool=$(readlink -e "${0%/install}"/...)/lib/tool/admin
+       . "$tool"/lib/install.sh
 # ACTION install ./etc/nginx/org/heureux-cyclage/
        content=$("$tool"/cat etc/nginx/org/heureux-cyclage/key.pem)
        "$tool"/ssh-sudo install -d -m 755 -o root -g root \
index 2fe799c..73df8b9 100644 (file)
@@ -1,6 +1,6 @@
 server_name
     www.heureux-cyclage.org;
-root /home/www/data/lhc-www/www;
+root /home/www/data/org/heureux-cyclage/www/www;
 index index.php;
 
 client_body_buffer_size 8k;
deleted file mode 120000 (symlink)
index 135b97d18b3bcc472c3501d1d8165ca3b4ead05c..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-.../lib/tool/admin/etc/nginx/$site/install
\ No newline at end of file
new file mode 100755 (executable)
index 0000000000000000000000000000000000000000..84bc161f54dff4f6d3a2072fb53a30ac27d3d26d
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh -eu
+# SYNTAX: $path
+# DESCRIPTION: install
+
+# ACTION: initialize from .../lib/tool/admin/
+       tool=$(readlink -e "${0%/install}"/...)/lib/tool/admin
+       . "$tool"/lib/install.sh
+# ACTION: initialize $sv from ./sys/$sv/
+       sv=${cmd##*/etc/}
+       sv=${sv%%/*}
+# ACTION: initialize $site from ./etc/$sv/$site/install
+       site=${cmd##*/"$sv"/}
+       site=${site%/install}
+# ACTION: install from ./etc/nginx/\$site/install
+       "$tool"/etc/nginx/\$site/install "$site"
+# TODO: invoke php install script /etc/php5/fpm/org/heureux-cyclage/www/install
+# ACTION: install from ./etc/nginx/org/heureux-cyclage/www
+       nginx_log_home=$("$tool"/cat sys/nginx/log/home)
+       nginx_log_user=$("$tool"/cat sys/nginx/log/user)
+       pool=$("$tool"/cat sys/php5/fpm/org/heureux-cyclage/www/pool)
+       user=$("$tool"/cat sys/nginx/org/heureux-cyclage/www/user)
+       home=$("$tool"/cat sys/nginx/org/heureux-cyclage/www/home)
+       "$tool"/ssh-sudo \
+               install -D -d -m 2750 -o "$nginx_log_user" -g "$nginx_log_user" \
+                "$nginx_log_home"/"$site"/tls
+       "$tool"/ssh-sudo adduser "$pool" "$user"
+       "$tool"/etc/mysql/user/install "$pool"
+       "$tool"/etc/mysql/database/install "$pool"
+       "$tool"/install etc/nginx/org/heureux-cyclage/www
index 5ef111f..258bf21 100644 (file)
@@ -3,6 +3,8 @@ define(`SITE',`DOMAIN/www')dnl
 server {
        listen 80;
        include /etc/nginx/SITE/common.conf;
+       access_log /home/www/log/SITE/access.log main;
+       error_log  /home/www/log/SITE/error.log warn;
  }
 server {
        listen 443;
@@ -10,6 +12,8 @@ server {
        include /etc/nginx/conf.d/ssl-pfs.conf;
        ssl_certificate     /etc/nginx/DOMAIN/crt.pem;
        ssl_certificate_key /etc/nginx/DOMAIN/key.pem;
+       access_log /home/www/log/SITE/tls/access.log main;
+       error_log  /home/www/log/SITE/tls/error.log warn;
 }
 server {
        server_name heureux-cyclage.org;
diff --git a/srv/ateliers/sys/mysql/... b/srv/ateliers/sys/mysql/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/sys/mysql/user b/srv/ateliers/sys/mysql/user
new file mode 100644 (file)
index 0000000..0d46ca3
--- /dev/null
@@ -0,0 +1 @@
+mysql
\ No newline at end of file
diff --git a/srv/ateliers/sys/nginx/log/... b/srv/ateliers/sys/nginx/log/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/sys/nginx/log/home b/srv/ateliers/sys/nginx/log/home
new file mode 100644 (file)
index 0000000..26ab953
--- /dev/null
@@ -0,0 +1 @@
+/home/www/log
\ No newline at end of file
diff --git a/srv/ateliers/sys/nginx/log/user b/srv/ateliers/sys/nginx/log/user
new file mode 100644 (file)
index 0000000..94b229f
--- /dev/null
@@ -0,0 +1 @@
+log-www
\ No newline at end of file
index f27e275..30191d3 100644 (file)
@@ -1 +1 @@
-/home/www/data/lhc-www
\ No newline at end of file
+/home/www/data/org/heureux-cyclage/www
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/... b/srv/ateliers/sys/php5/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/... b/srv/ateliers/sys/php5/fpm/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/org/... b/srv/ateliers/sys/php5/fpm/org/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/... b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/www/... b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/www/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/www/pool b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/www/pool
new file mode 100644 (file)
index 0000000..de0e80a
--- /dev/null
@@ -0,0 +1 @@
+php_lhc_www
\ No newline at end of file