#!/bin/bash
#  server - Server support library

set -e

lib_load 'sys/tool/apt'

server_usage() { apt_class_usage 'server'; }
server_deps() { apt_class_deps 'server'; }
server_install() { apt_class_install 'server'; }
server_config() { has_args 1 "$@"; }

server_name() {
	[ "$1" ] || error "unable to resolve empty server name"
	host "$1" |tail -n1 |cut -f1 -d\.
}

server_addr() {
	[ "$1" ] || error "unable to resolve empty server name"
	host "$1" |tail -n1 |cut -f4 -d' '
}

View the Script Reference Index


Generated on Tue Apr 25 21:21:18 PDT 2017 by mcsh i7 v0.18.0.