17 lines
267 B
Plaintext
17 lines
267 B
Plaintext
|
#!/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
|
||
|
}
|