File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ rm -rf %{buildroot}
5050%config(noreplace) /etc/crowdsec/bouncers/%{name }.yaml
5151
5252
53- %post
53+ %post -p /bin/bash
5454systemctl daemon-reload
5555
5656
@@ -89,6 +89,20 @@ echo "please enter the binary path in '/etc/crowdsec/bouncers/crowdsec-custom-bo
8989*
Wed Jun 30 2021 Shivam Sandbhor <[email protected] > 9090- First initial packaging
9191
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