Commit 53e6f348aed1df73c9d2b3b440b8728205be0f71

Authored by Ricardo Teixeira
Committed by Paulo Tada
1 parent aafa824f
Exists in master and in 1 other branch mezuro_spb

Recipe for verify more then one noosfero package and fix spec of noosfero

cookbooks/noosfero/recipes/default.rb
... ... @@ -10,8 +10,15 @@ package 'noosfero-deps' do
10 10 notifies :restart, 'service[noosfero]'
11 11 end
12 12  
  13 +#Verify if exits more then one noosfero package then remove it
  14 +bash 'noosfero remove extra packages' do
  15 + code 'rpm -q noosfero | while read line; do rpm -e --noscripts $line; done'
  16 + #ignore_failure true
  17 + only_if 'a=$(rpm -q noosfero | wc -l);if [ "$a" -gt "1" ] ; then "0"; else "1" ;fi'
  18 +end
  19 +
13 20 package 'noosfero' do
14   - action :upgrade
  21 + action :install
15 22 notifies :restart, 'service[noosfero]'
16 23 end
17 24  
... ...
src/pkg-rpm/noosfero/noosfero.spec
... ... @@ -101,6 +101,7 @@ production:
101 101 database: noosfero_production
102 102 username: noosfero
103 103 host: localhost
  104 +
104 105 port: 5432
105 106 EOF
106 107  
... ... @@ -163,7 +164,7 @@ fi
163 164  
164 165 %preun
165 166 service noosfero stop
166   -chkconfig --del noosfero
  167 +systemctl disable noosfero
167 168  
168 169 %files
169 170 /usr/lib/noosfero
... ...