mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-06-05 17:01:53 +00:00
* [#46] Ensure Travis mounts repository rather than clones it in Docker * [#46] Containerize HIRS ACA and prep ACA container for Integration Tests * [#46] Containerize HIRS TPM2Provisioner and prep TPM2Provisioner container for Integration Tests * [#46] Replace localinstall with install * [#46] Prevent rebuilding of packages unnecessarily * [#46] Finish initial docker compose setup for integration tests * [#46] Allow for detection of complete Integration Environment Setup * [#46] Fix Travis CI to allow for detecting Integ Test Environ Stand-Up * [#46] Fix Initial Integration Test Script * [#46] Troubleshoot Integration Test script
21 lines
660 B
Bash
21 lines
660 B
Bash
if ! [ $(id -u) = 0 ]; then
|
|
echo "Please run this script as root."
|
|
exit 1
|
|
fi
|
|
|
|
CENTOS_VER=`/opt/hirs/scripts/common/get_centos_major_version.sh`
|
|
|
|
if [ $CENTOS_VER -eq "6" ] ; then
|
|
checkHTTPS=`iptables-save | grep -- "--dport 8443 -j ACCEPT"`
|
|
if [[ $checkHTTPS == "" ]]; then
|
|
echo "Tomcat HTTPS firewall rule doesn't exist, adding now"
|
|
iptables -I INPUT 1 -p tcp -m tcp --dport 8443 -j ACCEPT
|
|
service iptables save
|
|
fi
|
|
elif [ $CENTOS_VER -eq "7" ] ; then
|
|
firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 8443 -j ACCEPT
|
|
firewall-cmd --reload
|
|
else
|
|
echo "Unsupported CentOS version: ${CENTOS_VER}"
|
|
exit 1
|
|
fi |