Now that works

This commit is contained in:
Jack L. Frost 2014-09-30 09:37:06 +04:00
parent a56e4e2b29
commit e61bb3c1b2

View File

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