#!/bin/bash
# s7 - user support tool

set -e

source "/home/zwelch/src/mcf/mcsh-release/install/share/mcsh/mcsh.sh"

lib_load 'sys/support'


######
# Check

s7_config_init() {
	:
}

s7_config_check() {
	:
}


######
# Support commands

s7_docs() {
	warn "TODO: display the documentation"
}

s7_email() { support_email "$@"; }

s7_issue() {
	warn "TODO: file issue in bug tracker"
}

s7_crash() {
	warn "TODO: reproduce a crash and file a report"
}


######
# GUI commands

s7_screen() { cmd_dispatch "$@"; }
s7_screen_capture() { error_unimplemented; }
s7_screen_share() { error_unimplemented; }
s7_screen_view() { error_unimplmented; }


######
# Support remote commands

s7_remote() { cmd_dispatch "$@"; }

s7_remote_usage() {
	cat <<USAGE
<cmd> ...
Remote Support Configuration:
	config <keyfile>		Configures tunnel to support server
	running				Returns success if tunnel is open

Remote Support Tunnel Management:
	open				Opens tunnel to remote support server
	close				Closes tunnel to remote support server

Remote Support Log Commands:
	log show			Views the remote support log file
	log reset			Clears the remote support log file
USAGE
}

s7_remote_help() {
	cat <<HELP
The 'remote' command group manages a secure connection with an official
support server.  The resulting remote allows support personnel to access
your system for troubleshooting and maintenance procedures.  Connections
may be monitored by using the 'monitor' command group.
HELP
}

s7_remote_config() { support_tunnel_config "$@"; }
s7_remote_running() { support_tunnel_running; }

s7_remote_open() { support_tunnel_open; }
s7_remote_close() { support_tunnel_close; }

s7_remote_log() { cmd_dispatch "$@"; }
s7_remote_log_show() { support_tunnel_log_show; }
s7_remote_log_reset() { support_tunnel_log_reset; }


######
# Main

s7_desc() { echo "user support tool"; }
s7_usage() {
	cat <<USAGE
<cmd> ...
Support Commands:
	docs				Opens online documentation in browser
	crash				Reproduces and reports a crash
	issue				Files a new support issue
	email				Sends an email to the support address

Support Command Groups:
	remote ...			Remote support commands
USAGE
}

app_run "$@"

View the Developer Guide Index

View the Reference Manual Index


Generated on Fri Jul 28 14:34:46 PDT 2017 by mcsh d14 v0.23.0.