Skip to content
This repository was archived by the owner on Jul 20, 2024. It is now read-only.

Commit 9668231

Browse files
authored
Add restart of SSM agent for stable connection (#8)
1 parent 671d99f commit 9668231

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

data/init.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,11 @@ iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
2121
# Switch the default route to eth1
2222
ip route del default dev eth0
2323

24+
# Waiting for network connection
25+
curl --retry 10 http://www.example.com
26+
27+
# Restart the SSM agent
28+
systemctl restart amazon-ssm-agent.service
29+
2430
# Run the extra script if set
2531
${extra_user_data}

0 commit comments

Comments
 (0)