File tree 1 file changed +18
-4
lines changed
1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ rm -rf %{buildroot}
50
50
%config(noreplace) /etc/crowdsec/bouncers/%{name }.yaml
51
51
52
52
53
- %post
53
+ %post -p /bin/bash
54
54
systemctl daemon-reload
55
55
56
56
@@ -89,6 +89,20 @@ echo "please enter the binary path in '/etc/crowdsec/bouncers/crowdsec-custom-bo
89
89
*
Wed Jun 30 2021 Shivam Sandbhor <[email protected] >
90
90
- First initial packaging
91
91
92
- %preun
93
- systemctl stop crowdsec-custom-bouncer || echo "cannot stop service"
94
- systemctl disable crowdsec-custom-bouncer || echo "cannot disable service"
92
+ %preun -p /bin/bash
93
+
94
+ if [ "$1" == "0" ] ; then
95
+ systemctl stop crowdsec-custom-bouncer || echo "cannot stop service"
96
+ systemctl disable crowdsec-custom-bouncer || echo "cannot disable service"
97
+ fi
98
+
99
+
100
+
101
+ %postun -p /bin/bash
102
+
103
+ if [ "$1" == "1" ] ; then
104
+ systemctl restart crowdsec-custom-bouncer || echo "cannot restart service"
105
+ elif [ "$1" == "0" ] ; then
106
+ systemctl stop crowdsec-custom-bouncer
107
+ systemctl disable crowdsec-custom-bouncer
108
+ fi
You can’t perform that action at this time.
0 commit comments