init
This commit is contained in:
16
init.d/hostname
Executable file
16
init.d/hostname
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
}
|
Reference in New Issue
Block a user