13 lines
279 B
Plaintext
13 lines
279 B
Plaintext
#!/usr/bin/env watchman
|
|
|
|
# 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'
|
|
service_args=( "$cfg_hostname" )
|