ssm-services/init.d/hostname

17 lines
267 B
Plaintext
Executable File

#!/usr/bin/env watchman
service_type='oneshot'
service_command='hostname'
service_args="$cfg_hostname"
start() {
[[ -e "/etc/hostname" ]] && {
cfg_hostname=`cat /etc/hostname`
} || {
watchman.err "/etc/hostname: no such file"
return 1
}
watchman.start
}