Commit bd33a61a8861f823873b07d49d5ef9e3b6205d4a
1 parent
a5e21596
Exists in
master
and in
79 other branches
Update Noosfero package
* Update source * Restart service on package upgrade
Showing
1 changed file
with
14 additions
and
2 deletions
Show diff stats
noosfero/noosfero.spec
@@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
2 | %define cache_dirs javascripts/cache stylesheets/cache | 2 | %define cache_dirs javascripts/cache stylesheets/cache |
3 | 3 | ||
4 | Name: noosfero | 4 | Name: noosfero |
5 | -Version: 1.2~rc0 | ||
6 | -Release: 2%{?dist} | 5 | +Version: 1.2~rc1+spb1 |
6 | +Release: 1%{?dist} | ||
7 | Summary: Social Networking Platform | 7 | Summary: Social Networking Platform |
8 | Group: Applications/Publishing | 8 | Group: Applications/Publishing |
9 | License: AGPLv3 | 9 | License: AGPLv3 |
@@ -104,6 +104,12 @@ NOOSFERO_USER="noosfero" | @@ -104,6 +104,12 @@ NOOSFERO_USER="noosfero" | ||
104 | NOOSFERO_DATA_DIR="/var/lib/noosfero" | 104 | NOOSFERO_DATA_DIR="/var/lib/noosfero" |
105 | EOF | 105 | EOF |
106 | 106 | ||
107 | +%pre | ||
108 | +if [ $1 -gt 1 ]; then | ||
109 | + echo 'Stopping noosfero' | ||
110 | + systemctl stop noosfero | ||
111 | +fi | ||
112 | + | ||
107 | %post | 113 | %post |
108 | groupadd noosfero || true | 114 | groupadd noosfero || true |
109 | if ! id noosfero; then | 115 | if ! id noosfero; then |
@@ -136,6 +142,12 @@ if [ -x /usr/bin/postgres ]; then | @@ -136,6 +142,12 @@ if [ -x /usr/bin/postgres ]; then | ||
136 | su noosfero -c "RAILS_ENV=production bundle exec rake db:data:minimal" | 142 | su noosfero -c "RAILS_ENV=production bundle exec rake db:data:minimal" |
137 | fi | 143 | fi |
138 | 144 | ||
145 | +if [ $1 -gt 1 ]; then | ||
146 | + echo 'Starting noosfero' | ||
147 | + systemctl daemon-reload | ||
148 | + systemctl start noosfero & | ||
149 | +fi | ||
150 | + | ||
139 | %preun | 151 | %preun |
140 | service noosfero stop | 152 | service noosfero stop |
141 | chkconfig --del noosfero | 153 | chkconfig --del noosfero |