Skip to content
This repository was archived by the owner on Mar 22, 2024. It is now read-only.

Commit 34fd5ba

Browse files
authored
Merge pull request #63 from cvmfs/fix-rpm
Fixing RPM pre install scripts
2 parents 9539134 + 0eddafb commit 34fd5ba

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

ci/spec/pre

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
%pre
22

33
if [ x"$(which systemctl)" != x"" ]; then
4-
systemctl stop cvmfs-gateway
4+
if [ "x$(systemctl list-unit-files | grep cvmfs-gateway)" != "x" ]; then
5+
systemctl stop cvmfs-gateway
6+
fi
57
else
6-
/usr/libexec/cvmfs-gateway/scripts/run_cvmfs_gateway.sh stop
8+
if [ -x /usr/libexec/cvmfs-gateway/scripts/run_cvmfs_gateway.sh ]; then
9+
/usr/libexec/cvmfs-gateway/scripts/run_cvmfs_gateway.sh stop
10+
fi
711
fi

ci/spec/preun

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
%preun
22

33
if [ x"$(which systemctl)" != x"" ]; then
4-
systemctl stop cvmfs-gateway
4+
if [ "x$(systemctl list-unit-files | greo cvmfs-gateway)" != "x" ]; then
5+
systemctl stop cvmfs-gateway
6+
fi
57
else
6-
/usr/libexec/cvmfs-gateway/scripts/run_cvmfs_gateway.sh stop
8+
if [ -x /usr/libexec/cvmfs-gateway/scripts/run_cvmfs_gateway.sh ]; then
9+
/usr/libexec/cvmfs-gateway/scripts/run_cvmfs_gateway.sh stop
10+
fi
711
fi

0 commit comments

Comments
 (0)