sudo adduser php5_"$site" log-php5-"$site"
hint="run before: remote/runit-configure nginx -- $site"
-assert "sudo test -f /etc/agendav/config.php" hint
-sudo chgrp php5_$site /etc/agendav/config.php
+assert "sudo test -f /etc/$site/config.php" hint
+sudo chgrp php5_$site /etc/"$site"/config.php
sudo sv start postgres
while ! sudo -u postgres psql </dev/null
"$tool"/local/postgresql-user-create "$site"
"$tool"/local/postgresql-database-create "$site"
-sudo -u postgres psql -AqtX "$site" <<-EOF
- \set ON_ERROR_STOP on
- GRANT USAGE ON SCHEMA pg_catalog TO $site;
- EOF
eval home="~www-$site"
if test ! shared = "$(sudo -u postgres psql -AqtX "$site" <<-EOF
EOF
)"
then
- sudo -u php5_"$site" psql -f - -U "$site" "$site" <<-EOF
- \set ON_ERROR_STOP on
- $(sudo cat "$home"/sql/pgsql.schema.sql)
- EOF
+ sudo cat "$home"/sql/pgsql.schema.sql |
+ sudo -u php5_"$site" psql -f - -U "$site" --set ON_ERROR_STOP=1 "$site"
fi
sudo install -d -m 750 -o root -g php5_"$site" \
- /etc/agendav
-sudo find "$tool"/etc/agendav -type f \
+ /etc/"$site"
+sudo find "$tool"/etc/"$site" -type f \
-not -name config.php \
-exec install -m 640 -o root -g php5_"$site" \
- -t /etc/agendav/ {} +
+ -t /etc/"$site"/ {} +