Hi
Can you try with this
container/run/create_dns_entries.sh like this
sh-4.4$ cat create_dns_entries.sh
if ! grep -q "192.168.0.227 ciscoisenew2.ciscoisenew.lab.blr" /etc/hosts;
then
Log "ciscoisenew2.ciscoisenew.lab.blr Hosts entry not present. Adding in /etc/hosts"
as_root "echo 192.168.0.227 ciscoisenew2.ciscoisenew.lab.blr >> /etc/hosts"
else
Log "ciscoisenew2.ciscoisenew.lab.blr Hosts entry already present in /etc/hosts, skipping"
fi
and
container/run/ordering.txt in your app zip with this
sh-4.4$ cat ordering.txt
/opt/app-root/container/run/create_dns_entries.sh
Then it should get logged to startup.log under /opt/app-root/store/log like this
2021-01-21 10:38:24 A0000_start_container.sh running with pid 15
2021-01-21 10:38:24 A0000 Configurating default host strategy.
2021-01-21 10:38:24 A0000 Checking if certificates need to be copied from /etc/qradar_pki to /etc/pki
2021-01-21 10:38:24 A0000 /etc/qradar_pki exists, attempting to copy certificates from /etc/qradar_pki to /etc/pki
2021-01-21 10:38:24 A0000 Copied certificates successfully from /etc/qradar_pki to /etc/pki
2021-01-21 10:38:24 A0000 Attempting to update hosts file with FQDN if present in environment variables
2021-01-21 10:38:24 A0000 FQDN and console ip found in environment variables, will add to hosts file if required
2021-01-21 10:38:24 A0000 Hosts entry not present for FQDN, adding to /etc/hosts
2021-01-21 10:38:25 A0000 Did not find console PEM cert in environment
2021-01-21 10:38:25 A0000 Executing commands from /opt/app-root/container/run/ordering.txt
2021-01-21 10:38:25 /opt/app-root/container/run/create_dns_entries.sh
2021-01-21 10:38:25 ciscoisenew2.ciscoisenew.lab.blr Hosts entry not present. Adding in /etc/hosts
2021-01-21 10:38:25 as_root command [echo 192.168.0.227 ciscoisenew2.ciscoisenew.lab.blr >> /etc/hosts] exited with status 0
2021-01-21 10:38:25 A0000_start_container.sh exited with status 0
2021-01-21 10:38:25 A9800_configure.sh running with pid 45
2021-01-21 10:38:25 A9800 Altering sudo access for appuser to allow only update_ca_bundle.sh
2021-01-21 10:38:25 A9800_configure.sh exited with status 0
and /etc/hosts gets the new entry from my test app like this
sh-4.4$ cat /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
169.254.3.7 9bc647b1a5b9
192.168.0.227 ciscoisenew2.ciscoisenew.lab.blr
#QRadar#Support#SupportMigration