#!/bin/bash
# host - Host management support
set -e
######
# Settings
core_host_config_init() {
lib_setting_vars host domain
host=$(hostname)
domain=$(hostname -d)
}
######
# Public interface
is_localhost() { [ "$1" = "$host" -o "$" = localhost ]; }
######
# Host power control
host_shutdown_run() {
local flag=$1
local when=${2:-now}
run shutdown $flag "$when"
}
host_restart() { has_args 1 "$@"; host_shutdown_run -r "$1"; }
host_poweroff() { has_args 1 "$@"; host_shutdown_run -h "$1"; }
Generated on Fri Jul 28 14:34:56 PDT 2017 by mcsh d14 v0.23.0.