1 rule _runit_sv_configure php5-fpm
'*'
2 rule _runit_sv_restart php5-fpm
3 rule apt_get_install nginx spawn-fcgi fcgiwrap
4 rule insserv_remove nginx
5 rule insserv_remove fcgiwrap
9 sudo
install -d -m 770 -o www
-g www \
17 sudo
install -m 660 -o www
-g www \
18 "$tool"/etc
/nginx
/nginx.conf \
21 for conf
in $
(find "$tool"/etc
/nginx
/conf.d \
22 -mindepth 1 -maxdepth 1 -type f \
26 sudo
install -m 660 -o www
-g www \
27 "$tool"/etc
/nginx
/conf.d
/"$conf" \
28 /etc
/nginx
/conf.d
/"$conf"
31 for site
in $
(find "$tool"/etc
/nginx
/site.d \
32 -mindepth 1 -maxdepth 1 -type d \
33 -false ${@:+$(printf -- '-or -name %s\n' "$@")} \
36 rule adduser www-
"$site" \
40 --home /home
/www
/pub
/"$site" \
43 rule adduser log-www-
"$site" \
47 --home /home
/www
/log
/"$site"/nginx \
50 sudo
install -d -m 771 -o log-www
-g log-www \
52 sudo
install -d -m 770 -o www
-g www \
53 /etc
/nginx
/site.d
/"$site"
54 sudo
install -d -m 770 -o www
-g www \
55 /etc
/nginx
/x509.d
/"$site"
56 test -L /home
/www
/pub
/"$site" ||
57 sudo
install -d -m 2770 -o www-
"$site" -g www-
"$site" \
59 sudo adduser www-data www-
"$site"
60 sudo adduser www-data log-www-
"$site"
61 sudo
install -m 660 -o www
-g www \
62 "$tool"/etc
/nginx
/site.d
/"$site"/local.conf \
63 /etc
/nginx
/site.d
/"$site"/local.inc
64 sudo
install -m 660 -o www
-g www \
65 "$tool"/etc
/nginx
/site.d
/"$site"/site.conf \
66 /etc
/nginx
/site.d
/"$site"/site.inc
67 sudo
install -m 660 -o www
-g www
/dev
/stdin \
68 /etc
/nginx
/site.d
/"$site"/server.conf
<<-EOF
70 access_log /home/www/log/$site/nginx/access.log main;
71 error_log /home/www/log/$site/nginx/error.log warn;
72 root /home/www/pub/$site;
73 include /etc/nginx/site.d/$site/local.inc;
74 include /etc/nginx/site.d/$site/site.inc;
78 test ! -r "$tool"/etc
/nginx
/site.d
/"$site"/configure.sh ||
79 .
"$tool"/etc
/nginx
/site.d
/"$site"/configure.sh ||
return 1