From 098662a51e9df791fe5200374ea4520ac8e23094 Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Fri, 20 Mar 2015 18:53:38 +0100 Subject: [PATCH] =?utf8?q?Modifications=C2=A0:=20=20=20=20=20=20=20=20=20e?= =?utf8?q?tc/nginx/org/heureux-cyclage/install?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/tool/admin | 2 +- .../etc/nginx/org/heureux-cyclage/install | 5 ++-- .../org/heureux-cyclage/www/common.conf.m4 | 2 +- .../etc/nginx/org/heureux-cyclage/www/install | 30 ++++++++++++++++++- .../org/heureux-cyclage/www/server.conf.m4 | 4 +++ srv/ateliers/sys/mysql/... | 1 + srv/ateliers/sys/mysql/user | 1 + srv/ateliers/sys/nginx/log/... | 1 + srv/ateliers/sys/nginx/log/home | 1 + srv/ateliers/sys/nginx/log/user | 1 + .../sys/nginx/org/heureux-cyclage/www/home | 2 +- srv/ateliers/sys/php5/... | 1 + srv/ateliers/sys/php5/fpm/... | 1 + srv/ateliers/sys/php5/fpm/org/... | 1 + .../sys/php5/fpm/org/heureux-cyclage/... | 1 + .../sys/php5/fpm/org/heureux-cyclage/www/... | 1 + .../sys/php5/fpm/org/heureux-cyclage/www/pool | 1 + 17 files changed, 49 insertions(+), 7 deletions(-) mode change 120000 => 100755 srv/ateliers/etc/nginx/org/heureux-cyclage/www/install create mode 120000 srv/ateliers/sys/mysql/... create mode 100644 srv/ateliers/sys/mysql/user create mode 120000 srv/ateliers/sys/nginx/log/... create mode 100644 srv/ateliers/sys/nginx/log/home create mode 100644 srv/ateliers/sys/nginx/log/user create mode 120000 srv/ateliers/sys/php5/... create mode 120000 srv/ateliers/sys/php5/fpm/... create mode 120000 srv/ateliers/sys/php5/fpm/org/... create mode 120000 srv/ateliers/sys/php5/fpm/org/heureux-cyclage/... create mode 120000 srv/ateliers/sys/php5/fpm/org/heureux-cyclage/www/... create mode 100644 srv/ateliers/sys/php5/fpm/org/heureux-cyclage/www/pool diff --git a/lib/tool/admin b/lib/tool/admin index 9678e3a..ebe4b43 160000 --- a/lib/tool/admin +++ b/lib/tool/admin @@ -1 +1 @@ -Subproject commit 9678e3aa85ca152f6f9e5a6e16d1abaf3479b120 +Subproject commit ebe4b43bce57629859ae1b2d30d244679719ae96 diff --git a/srv/ateliers/etc/nginx/org/heureux-cyclage/install b/srv/ateliers/etc/nginx/org/heureux-cyclage/install index 97a4a5a..40857f4 100755 --- a/srv/ateliers/etc/nginx/org/heureux-cyclage/install +++ b/srv/ateliers/etc/nginx/org/heureux-cyclage/install @@ -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 \ diff --git a/srv/ateliers/etc/nginx/org/heureux-cyclage/www/common.conf.m4 b/srv/ateliers/etc/nginx/org/heureux-cyclage/www/common.conf.m4 index 2fe799c..73df8b9 100644 --- a/srv/ateliers/etc/nginx/org/heureux-cyclage/www/common.conf.m4 +++ b/srv/ateliers/etc/nginx/org/heureux-cyclage/www/common.conf.m4 @@ -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; diff --git a/srv/ateliers/etc/nginx/org/heureux-cyclage/www/install b/srv/ateliers/etc/nginx/org/heureux-cyclage/www/install deleted file mode 120000 index 135b97d..0000000 --- a/srv/ateliers/etc/nginx/org/heureux-cyclage/www/install +++ /dev/null @@ -1 +0,0 @@ -.../lib/tool/admin/etc/nginx/$site/install \ No newline at end of file diff --git a/srv/ateliers/etc/nginx/org/heureux-cyclage/www/install b/srv/ateliers/etc/nginx/org/heureux-cyclage/www/install new file mode 100755 index 0000000..84bc161 --- /dev/null +++ b/srv/ateliers/etc/nginx/org/heureux-cyclage/www/install @@ -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 diff --git a/srv/ateliers/etc/nginx/org/heureux-cyclage/www/server.conf.m4 b/srv/ateliers/etc/nginx/org/heureux-cyclage/www/server.conf.m4 index 5ef111f..258bf21 100644 --- a/srv/ateliers/etc/nginx/org/heureux-cyclage/www/server.conf.m4 +++ b/srv/ateliers/etc/nginx/org/heureux-cyclage/www/server.conf.m4 @@ -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 index 0000000..951b30d --- /dev/null +++ b/srv/ateliers/sys/mysql/... @@ -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 index 0000000..0d46ca3 --- /dev/null +++ b/srv/ateliers/sys/mysql/user @@ -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 index 0000000..951b30d --- /dev/null +++ b/srv/ateliers/sys/nginx/log/... @@ -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 index 0000000..26ab953 --- /dev/null +++ b/srv/ateliers/sys/nginx/log/home @@ -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 index 0000000..94b229f --- /dev/null +++ b/srv/ateliers/sys/nginx/log/user @@ -0,0 +1 @@ +log-www \ No newline at end of file diff --git a/srv/ateliers/sys/nginx/org/heureux-cyclage/www/home b/srv/ateliers/sys/nginx/org/heureux-cyclage/www/home index f27e275..30191d3 100644 --- a/srv/ateliers/sys/nginx/org/heureux-cyclage/www/home +++ b/srv/ateliers/sys/nginx/org/heureux-cyclage/www/home @@ -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 index 0000000..951b30d --- /dev/null +++ b/srv/ateliers/sys/php5/... @@ -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 index 0000000..951b30d --- /dev/null +++ b/srv/ateliers/sys/php5/fpm/... @@ -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 index 0000000..951b30d --- /dev/null +++ b/srv/ateliers/sys/php5/fpm/org/... @@ -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 index 0000000..951b30d --- /dev/null +++ b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/... @@ -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 index 0000000..951b30d --- /dev/null +++ b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/www/... @@ -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 index 0000000..de0e80a --- /dev/null +++ b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/www/pool @@ -0,0 +1 @@ +php_lhc_www \ No newline at end of file -- 2.20.1