ssm-services/init.d/hostname
fbt 2205f72a2e watchman -> ssm
Signed-off-by: fbt <fbt@fleshless.org>
2017-07-13 16:09:42 +03:00

13 lines
274 B
Plaintext

#!/usr/bin/env ssm
# 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" )