Merge pull request #59 from haiwen/fix-firewalld-reload

Fix script exit caused by firewalld not running under CentOS7.
This commit is contained in:
Daniel Pan 2019-02-18 11:29:22 +08:00 committed by GitHub
commit 3ab63f30e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 16 deletions

View File

@ -1,3 +1,3 @@
ccnet-db
seafile-db
seahub-db
ccnet_db
seafile_db
seahub_db

View File

@ -1,11 +1,11 @@
seahub-db.avatar_uploaded
seahub-db.avatar_avatar
seahub-db.avatar_groupavatar
seahub-db.Event
seahub-db.FileAudit
seahub-db.FileUpdate
seahub-db.PermAudit
seahub-db.UserEvent
seahub-db.UserTrafficStat
seahub-db.VirusFile
seahub-db.VirusScanRecord
seahub_db.avatar_uploaded
seahub_db.avatar_avatar
seahub_db.avatar_groupavatar
seahub_db.Event
seahub_db.FileAudit
seahub_db.FileUpdate
seahub_db.PermAudit
seahub_db.UserEvent
seahub_db.UserTrafficStat
seahub_db.VirusFile
seahub_db.VirusScanRecord

View File

@ -151,8 +151,9 @@ sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
# -------------------------------------------
yum install firewalld fail2ban -y
# https://www.optimox.de/tutorials/linux-allgemein/centos-firewall-konfigurieren-mit-firewalld
for i in ssh http https ; do firewall-cmd --zone=public --add-service=${i} --permanent ; done
firewall-cmd --reload
systemctl status firewalld &> /dev/null \
&& for i in ssh http https ; do firewall-cmd --zone=public --add-service=${i} --permanent ; done \
&& firewall-cmd --reload
# -------------------------------------------
# Additional requirements