X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fsv%2Fcyclo_paris_est__openerp%2Frun;h=f2b05d438d524e6a7bfb5e49bf9f67618ad39bf2;hb=f5e12fec2c7ef8d743e2d3e32c3bbe37b40c7a73;hp=f930bc6d3d1287014d5951ee7954ec5dc6c7a0cb;hpb=840d2b430a302b020d17d1c4c23df9b48278f8b2;p=lhc%2Fateliers.git diff --git a/etc/sv/cyclo_paris_est__openerp/run b/etc/sv/cyclo_paris_est__openerp/run index f930bc6..f2b05d4 100755 --- a/etc/sv/cyclo_paris_est__openerp/run +++ b/etc/sv/cyclo_paris_est__openerp/run @@ -1,9 +1,57 @@ #!/bin/sh -eux exec 2>&1 sv=${PWD#/etc/sv/} -/usr/bin/sv -w 3 start postgres -eval "home=~$sv" +home=/home/"$sv" +cd / + +for addon in \ + bikecoop \ + bikecoop_l10n_fr \ + pos_membership \ + remembership \ + cyclofficine_paris_est + do + sudo install -d -m 2771 -o "$sv" -g "$sv"-addon \ + "$home"/addon.d/"$addon" + sudo -u git git \ + --git-dir ~git-data/burette/"$addon".git \ + --work-tree="$home"/addon.d/"$addon" \ + checkout -f master + #sudo -u git git \ + # --git-dir ~git-data/burette/"$addon".git \ + # --work-tree="$home"/addon.d/"$addon" \ + # clean -d -f -f -x + sudo install -m 550 -o git -g git /dev/stdin \ + /home/git/pub/burette/"$addon".git/hooks/post-update <<-EOF + git \ + --git-dir ~git-data/burette/"$addon".git \ + --work-tree="$home"/addon.d/"$addon" \ + checkout -f master + #git \ + # --git-dir ~git-data/burette/"$addon".git \ + # --work-tree="$home"/addon.d/"$addon" \ + # clean -d -f -f -x + #sv restart "$sv" + EOF + done + +test -e "$home"/etc/openerp/server.conf || +/usr/bin/chpst \ + -u "$sv":"$sv":"$sv"-addon:postgres-data \ + /usr/bin/openerp-server \ + --addons-path="$home"/addon.d \ + --config "$home"/etc/openerp/server.conf \ + --database="$sv" \ + --db_user="$sv" \ + --debug \ + --init=remembership,pos_membership,bikecoop \ + --load-language=fr_FR \ + --save \ + --stop-after-init \ + --without-demo=base \ + --workers=2 + exec /usr/bin/chpst \ -u "$sv":"$sv":"$sv"-addon:postgres-data \ - openerp-server \ + /usr/bin/openerp-server \ --config "$home"/etc/openerp/server.conf