Skip to content

Instantly share code, notes, and snippets.

@sierra-tango-echo
Last active June 6, 2020 11:57
Show Gist options
  • Save sierra-tango-echo/fc3da4863717a081ae77a563c76005c0 to your computer and use it in GitHub Desktop.
Save sierra-tango-echo/fc3da4863717a081ae77a563c76005c0 to your computer and use it in GitHub Desktop.
if [ -z "${CLUSTERNAME}" ]; then
echo "No clustername set" >&2
exit 1
fi
hostnamectl set-hostname cgw1.cloud.pri.${CLUSTERNAME}.alces.network
cat << EOF >> /etc/hosts
10.110.1.254 cgw1.cloud.pri.${CLUSTERNAME}.alces.network ${CLUSTERNAME}
EOF
yum -y install firewalld
firewall-offline-cmd --add-interface eth0 --zone public
cat << EOF > /etc/profile.d/flightcenter.sh
#Custom PS1 with client name
[ -f /etc/flightcentersupported ] && c=32 || c=31
if [ "\$PS1" ]; then
PS1="[\u@\h\[\e[1;\${c}m\][${CLUSTERNAME}]\[\e[0m\] \W]\\$ "
fi
EOF
touch /etc/flightcentersupported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment