ssm-services/init.d/hostname
2014-09-30 09:37:06 +04:00

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"