1 sudo adduser www-
"$site"-tls www-
"$site"
2 sudo adduser php_
"$site" www-
"$site"
3 sudo adduser php_
"$site" postgres-data
4 sudo adduser php_
"$site" log-php-
"$site"
6 hint
="run before: remote/runit-configure nginx -- $site"
7 assert
"sudo test -f /etc/$site/config.php" hint
8 sudo chgrp php_
$site /etc
/"$site"/config.php
10 sudo sv start postgres
11 while ! sudo
-u postgres psql
</dev
/null
14 "$tool"/local
/postgresql-user-create
"$site"
15 "$tool"/local
/postgresql-database-create
"$site"
17 eval home
="~www-$site"
18 if test ! shared
= "$(sudo -u postgres psql -AqtX "$site" <<-EOF
20 FROM pg_catalog.pg_class c
21 LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
23 AND c.relname = 'shared'
24 AND n.nspname = 'public';
28 sudo
cat "$home"/sql
/pgsql.schema.sql |
29 sudo
-u php_
"$site" psql
-f - -U "$site" --set ON_ERROR_STOP
=1 "$site"
32 sudo
install -d -m 750 -o root
-g php_
"$site" \
34 sudo
find "$tool"/etc
/"$site" -type f \
35 -not -name config.php \
36 -exec install -m 640 -o root
-g php_
"$site" \