Now that works

This commit is contained in:
Jack L. Frost 2014-09-30 09:37:06 +04:00
parent a56e4e2b29
commit e61bb3c1b2
1 changed files with 3 additions and 2 deletions

View File

@ -1,11 +1,12 @@
#!/usr/bin/env watchman
# Get hostname from /etc/hostname
if [[ -e "/etc/hostname" ]]; then
cfg_hostname="$(</etc/hostname)"
else
cfg_hostname='localhost'
fi
[[ "$cfg_hostname" ]] || { cfg_hostname='localhost'; }
service_type='oneshot'
service_command='hostname'
service_args="$cfg_hostname"