ssm-services/services/hostname
fbt 96f8f8944c named (thx Xion); make permissions consistent
Signed-off-by: fbt <fbt@fleshless.org>
2020-04-24 11:08:08 +03:00

12 lines
259 B
Plaintext
Executable File

#!/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 "$cfg_hostname" )