Commit 62a7a3f51d8c7486ea88144497921a87d622b087
1 parent
759e8400
Exists in
master
and in
79 other branches
Colab: fix service handling on upgrades
Showing
1 changed file
with
10 additions
and
4 deletions
Show diff stats
colab/colab.spec
1 | 1 | %define name colab |
2 | 2 | %define version 1.10.3 |
3 | -%define default_release 1 | |
3 | +%define default_release 2 | |
4 | 4 | %{!?release: %define release %{default_release}} |
5 | 5 | %define buildvenv /var/tmp/%{name}-%{version} |
6 | 6 | |
... | ... | @@ -186,6 +186,12 @@ ln -s /var/lib/colab-assets /usr/share/nginx/colab |
186 | 186 | |
187 | 187 | yes yes | colab-admin collectstatic |
188 | 188 | |
189 | -%preun | |
190 | -systemctl stop colab | |
191 | -systemctl disable colab | |
189 | +%postun | |
190 | +if [ $1 -eq 0 ]; then | |
191 | + # package being removed | |
192 | + systemctl stop colab | |
193 | + systemctl disable colab | |
194 | +else | |
195 | + # upgrade | |
196 | + systemctl try-restart colab | |
197 | +fi | ... | ... |