-Subproject commit 9678e3aa85ca152f6f9e5a6e16d1abaf3479b120
+Subproject commit ebe4b43bce57629859ae1b2d30d244679719ae96
# 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 \
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;
+++ /dev/null
-.../lib/tool/admin/etc/nginx/$site/install
\ No newline at end of file
--- /dev/null
+#!/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
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;
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;
--- /dev/null
+../...
\ No newline at end of file
--- /dev/null
+mysql
\ No newline at end of file
--- /dev/null
+../...
\ No newline at end of file
--- /dev/null
+/home/www/log
\ No newline at end of file
--- /dev/null
+log-www
\ No newline at end of file
-/home/www/data/lhc-www
\ No newline at end of file
+/home/www/data/org/heureux-cyclage/www
\ No newline at end of file
--- /dev/null
+../...
\ No newline at end of file
--- /dev/null
+../...
\ No newline at end of file
--- /dev/null
+../...
\ No newline at end of file
--- /dev/null
+../...
\ No newline at end of file
--- /dev/null
+../...
\ No newline at end of file
--- /dev/null
+php_lhc_www
\ No newline at end of file