dépôts
/
lhc
/
ateliers.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ajout : sauvegardes automatiques des bases postgresql.
[lhc/ateliers.git]
/
etc
/
sv
/
sympa
/
local.sh
diff --git
a/etc/sv/sympa/local.sh
b/etc/sv/sympa/local.sh
index
06f436a
..
ae7c1dc
100644
(file)
--- a/
etc/sv/sympa/local.sh
+++ b/
etc/sv/sympa/local.sh
@@
-4,7
+4,7
@@
home=/home/sympa
"$tool"/local/runit-sv-start postgres
while ! sudo -u postgres psql </dev/null
do sleep 1; done
"$tool"/local/runit-sv-start postgres
while ! sudo -u postgres psql </dev/null
do sleep 1; done
-
~postgres/bin/createuser
"$sv"
+
"$tool"/local/postgresql-user-create
"$sv"
sudo -u postgres psql template1 -a -f - <<-EOF
\set ON_ERROR_STOP on
-- NOTE: pour /usr/share/sympa/lib/Upgrade.pm
sudo -u postgres psql template1 -a -f - <<-EOF
\set ON_ERROR_STOP on
-- NOTE: pour /usr/share/sympa/lib/Upgrade.pm
@@
-157,3
+157,9
@@
sudo etckeeper commit -m "rule_runit_configure $sv"
# NOTE: évite d'installer apache2 ..
"$tool"/local/insserv-remove sympa
# NOTE: évite d'installer apache2 ..
"$tool"/local/insserv-remove sympa
+
+sudo -u postgres psql template1 -a -f - <<-EOF
+ \set ON_ERROR_STOP on
+ REVOKE ALL ON DATABASE $sv FROM public;
+ GRANT ALL PRIVILEGES ON DATABASE $sv TO $sv;
+ EOF