ssm-services/init.d/hostname

13 lines
275 B
Plaintext
Raw Normal View History

#!/usr/bin/env watchman
2014-09-30 05:37:06 +00:00
# Get hostname from /etc/hostname
if [[ -e "/etc/hostname" ]]; then
cfg_hostname="$(</etc/hostname)"
fi
2014-09-30 05:37:06 +00:00
[[ "$cfg_hostname" ]] || { cfg_hostname='localhost'; }
service_type='oneshot'
service_command='/usr/bin/hostname'
service_args="$cfg_hostname"