Merge source and RHEL elements, allowing both source and package based installations. Allow amphora agent install from distribution packages (not limited to RHEL) Add a new option to diskimage-create.sh script to do so (default is kept to source installation from Octavia git tree) For now, amphorae built with distribution packages will have SELinux (when available) running in permissive mode. Made the rebind-sshd element generic to streamline the script Use POSIX syntax for logrotate kill command Change-Id: I391b2a95d54c7b9fd8f31d3e2c136ff9cc3451f1
17 lines
570 B
Bash
Executable File
17 lines
570 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# isc dhcpd specific section
|
|
if [[ $DISTRO_NAME = "ubuntu" || $DISTRO_NAME = "debian" ]]; then
|
|
|
|
echo '#!/bin/sh
|
|
if [ "$reason" = "BOUND" ]; then
|
|
if `grep -q "#ListenAddress 0.0.0.0" /etc/ssh/sshd_config`; then
|
|
/bin/sed -i "s/^#ListenAddress 0.0.0.0.*$/ListenAddress $new_ip_address/g" /etc/ssh/sshd_config
|
|
if `/bin/ps -ef|/bin/grep -v grep|/bin/grep -q sshd`; then
|
|
/usr/sbin/service ssh restart
|
|
fi
|
|
fi
|
|
fi' > /etc/dhcp/dhclient-enter-hooks.d/rebind-sshd
|
|
chmod +x /etc/dhcp/dhclient-enter-hooks.d/rebind-sshd
|
|
fi
|