ssm-services/init.d/hostname

13 lines
266 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='hostname'
service_args="$cfg_hostname"