ssm-services/init.d/hostname

18 lines
268 B
Plaintext
Raw Normal View History

2013-09-28 23:32:39 +00:00
#!/usr/bin/env watchman
2013-09-29 00:03:34 +00:00
2013-09-28 23:32:39 +00:00
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
}