Files
ssm-services/init.d/hostname
T

13 lines
274 B
Plaintext
Raw Normal View History

2017-07-13 16:09:42 +03:00
#!/usr/bin/env ssm
2014-09-30 09:37:06 +04:00
# Get hostname from /etc/hostname
if [[ -e "/etc/hostname" ]]; then
cfg_hostname="$(</etc/hostname)"
fi
2014-09-30 09:37:06 +04:00
[[ "$cfg_hostname" ]] || { cfg_hostname='localhost'; }
service_type='oneshot'
service_command='/usr/bin/hostname'
2015-09-04 16:47:37 +03:00
service_args=( "$cfg_hostname" )