2017-07-13 13:09:42 +00:00
|
|
|
#!/usr/bin/env ssm
|
2014-09-30 05:33:51 +00:00
|
|
|
|
2014-09-30 05:37:06 +00:00
|
|
|
# Get hostname from /etc/hostname
|
2014-09-30 05:33:51 +00:00
|
|
|
if [[ -e "/etc/hostname" ]]; then
|
|
|
|
cfg_hostname="$(</etc/hostname)"
|
|
|
|
fi
|
|
|
|
|
2014-09-30 05:37:06 +00:00
|
|
|
[[ "$cfg_hostname" ]] || { cfg_hostname='localhost'; }
|
|
|
|
|
2014-09-30 05:33:51 +00:00
|
|
|
service_type='oneshot'
|
2017-12-10 17:44:17 +00:00
|
|
|
service_command=( /usr/bin/hostname "$cfg_hostname" )
|