2014-09-30 09:33:51 +04:00
|
|
|
#!/usr/bin/env watchman
|
|
|
|
|
2014-09-30 09:37:06 +04:00
|
|
|
# Get hostname from /etc/hostname
|
2014-09-30 09:33:51 +04:00
|
|
|
if [[ -e "/etc/hostname" ]]; then
|
|
|
|
cfg_hostname="$(</etc/hostname)"
|
|
|
|
fi
|
|
|
|
|
2014-09-30 09:37:06 +04:00
|
|
|
[[ "$cfg_hostname" ]] || { cfg_hostname='localhost'; }
|
|
|
|
|
2014-09-30 09:33:51 +04:00
|
|
|
service_type='oneshot'
|
2015-01-08 12:25:38 +03:00
|
|
|
service_command='/usr/bin/hostname'
|
2014-09-30 09:33:51 +04:00
|
|
|
service_args="$cfg_hostname"
|