From: Ludovic CHEVALIER Date: Thu, 26 Sep 2013 10:06:59 +0000 (+0200) Subject: Corrections : etc/sv/openerp_cyclofficines/local.sh X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=commitdiff_plain;h=888667a8270f3088954d85d1fdddb9b30e84a7f5 Corrections : etc/sv/openerp_cyclofficines/local.sh --- diff --git a/etc/sv/openerp_cyclofficines/local.sh b/etc/sv/openerp_cyclofficines/local.sh index e6887a3..dc04c3c 100644 --- a/etc/sv/openerp_cyclofficines/local.sh +++ b/etc/sv/openerp_cyclofficines/local.sh @@ -42,19 +42,18 @@ for db in \ sudo install -d -m 750 -o "$sv" -g "$sv" \ "$home"/etc \ /etc/openerp/"$db" + sudo -u postgres psql -AqtX "$db" <<-EOF + \set ON_ERROR_STOP on + GRANT USAGE ON SCHEMA pg_catalog TO $sv; + GRANT SELECT ON TABLE pg_catalog.pg_attribute TO $sv; + GRANT SELECT ON TABLE pg_catalog.pg_class TO $sv; + GRANT SELECT ON TABLE pg_catalog.pg_constraint TO $sv; + GRANT SELECT ON TABLE pg_catalog.pg_indexes TO $sv; + GRANT SELECT ON TABLE pg_catalog.pg_proc TO $sv; + GRANT SELECT ON TABLE pg_catalog.pg_type TO $sv; + EOF done -sudo -u postgres psql -AqtX "$sv" <<-EOF - \set ON_ERROR_STOP on - GRANT USAGE ON SCHEMA pg_catalog TO $sv; - GRANT SELECT ON TABLE pg_catalog.pg_attribute TO $sv; - GRANT SELECT ON TABLE pg_catalog.pg_class TO $sv; - GRANT SELECT ON TABLE pg_catalog.pg_constraint TO $sv; - GRANT SELECT ON TABLE pg_catalog.pg_indexes TO $sv; - GRANT SELECT ON TABLE pg_catalog.pg_proc TO $sv; - GRANT SELECT ON TABLE pg_catalog.pg_type TO $sv; - EOF - sudo adduser git "$sv"-addon sudo adduser "$sv" "$sv"-addon sudo adduser "$sv" postgres-data