ssm-services/init.d/hostname
2015-09-04 16:47:37 +03:00

13 lines
279 B
Plaintext

#!/usr/bin/env watchman
# Get hostname from /etc/hostname
if [[ -e "/etc/hostname" ]]; then
cfg_hostname="$(</etc/hostname)"
fi
[[ "$cfg_hostname" ]] || { cfg_hostname='localhost'; }
service_type='oneshot'
service_command='/usr/bin/hostname'
service_args=( "$cfg_hostname" )