Commit a0c8e72 1 parent 027e94a commit a0c8e72 Copy full SHA for a0c8e72
File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 705
705
706
706
%postun common-server
707
707
/bin/systemctl daemon-reload > /dev/null 2>&1 || :
708
- ZONE= `firewall-offline-cmd --get-default-zone 2> /dev/null`
709
- if [ ! -z "${ZONE}" ]; then
710
- set +e
711
- firewall-cmd --zone= ${ZONE} --remove-port= 14500/tcp --permanent >> /dev/null 2> &1
712
- if [ $? == "0" ]; then
713
- firewall-cmd --reload | grep -v "^success"
714
- else
715
- firewall-offline-cmd --add-port= 14500/tcp | grep -v "^success"
708
+ if [ $1 -eq 0 ]; then
709
+ ZONE=` firewall-offline-cmd --get-default-zone 2> /dev/null`
710
+ if [ ! -z " ${ZONE} " ]; then
711
+ set +e
712
+ firewall-cmd --zone=${ZONE} --remove-port=14500/tcp --permanent >> /dev/null 2>&1
713
+ if [ $? == " 0" ]; then
714
+ firewall-cmd --reload | grep -v " ^success"
715
+ else
716
+ firewall-offline-cmd --add-port=14500/tcp | grep -v " ^success"
717
+ fi
718
+ set -e
716
719
fi
717
- set -e
718
720
fi
719
721
%if 0%{?with_selinux }
720
722
if [ $1 -eq 0 ] ; then
You can’t perform that action at this time.
0 commit comments