-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
worked the help and completed testing, 2 programs work
- Loading branch information
Showing
3 changed files
with
70 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,2 @@ | ||
#!/bin/bash | ||
# docker-client-status.sh 2.1.21 2018-02-25_12:07:56_CST uadmin three-rpi3b.cptx86.com 1.2-1-g87d879f | ||
# change design to do all the work but don't know how to fork the process and the kill -9 the fork | ||
# | ||
# set -x | ||
# set -v | ||
### | ||
display_help() { | ||
echo -e "\n${0} - display display container status" | ||
echo " UNDER DEVELOPMENT to add REMOTEHOST. Currently works for local host only." | ||
echo -e "\nUSAGE\n ${0}" | ||
echo " ${0} [--help | -help | help | -h | h | -? | ?] [--version | -v]" | ||
echo -e "\nDESCRIPTION\nThis script " | ||
echo -e "\nOPTIONS" | ||
echo " arg1 XXXXXX" | ||
echo -e "\nDOCUMENTATION\n https://github.com/BradleyA/display-board-2-project" | ||
echo -e "\nEXAMPLES\n xxxxxxxx " | ||
echo -e " xxxxxXXXXxxxxXXXX, x\n\tsudo ${0}\n" | ||
} | ||
if [ "$1" == "--help" ] || [ "$1" == "-help" ] || [ "$1" == "help" ] || [ "$1" == "-h" ] || [ "$1" == "h" ] || [ "$1" == "-?" ] || [ "$1" == "?" ] ; then | ||
display_help | ||
exit 0 | ||
fi | ||
if [ "$1" == "--version" ] || [ "$1" == "-v" ] || [ "$1" == "version" ] ; then | ||
head -2 ${0} | awk {'print$2"\t"$3'} | ||
exit 0 | ||
fi | ||
### | ||
CLUSTER=${1:-docker-cluster-1} | ||
DISPLAY_HOST=${2:-three-rpi3b} | ||
DATA_DIR=${3:-/usr/local/data/} | ||
HOSTNAME=`hostname` | ||
BOLD=$(tput bold) | ||
NORMAL=$(tput sgr0) | ||
# >>> write to file in ${DATA_DIR}${CLUSTER}/${HOSTNAME} | ||
# mkdir -p ${DATA_DIR}${CLUSTER} | ||
# docker system info | head -5 > ${DATA_DIR}${CLUSTER}/${HOSTNAME} | ||
# Copy file to scroll-display | ||
# echo "copy file" | ||
# scp -i ~/.ssh/id_rsa ${DATA_DIR}${CLUSTER}/${HOSTNAME} uadmin@`hostname -f`:${DATA_DIR}${CLUSTER} | ||
scp -i ~/.ssh/id_rsa [email protected]:${DATA_DIR}${CLUSTER}/one-rpi3b ${DATA_DIR}${CLUSTER} | ||
### | ||
# docker-client-status.sh 2.5.35 2018-02-26_19:38:46_CST uadmin three-rpi3b.cptx86.com 2.4-1-gd14768e | ||
# worked the help and completed testing, 2 programs work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
# docker-client-status.sh 2.1.21 2018-02-25_12:07:56_CST uadmin three-rpi3b.cptx86.com 1.2-1-g87d879f | ||
# change design to do all the work but don't know how to fork the process and the kill -9 the fork | ||
# | ||
# set -x | ||
# set -v | ||
### | ||
display_help() { | ||
echo -e "\n${0} - display display container status" | ||
echo " UNDER DEVELOPMENT to add REMOTEHOST. Currently works for local host only." | ||
echo -e "\nUSAGE\n ${0}" | ||
echo " ${0} [--help | -help | help | -h | h | -? | ?] [--version | -v]" | ||
echo -e "\nDESCRIPTION\nThis script " | ||
echo -e "\nOPTIONS" | ||
echo " arg1 XXXXXX" | ||
echo -e "\nDOCUMENTATION\n https://github.com/BradleyA/display-board-2-project" | ||
echo -e "\nEXAMPLES\n xxxxxxxx " | ||
echo -e " xxxxxXXXXxxxxXXXX, x\n\tsudo ${0}\n" | ||
} | ||
if [ "$1" == "--help" ] || [ "$1" == "-help" ] || [ "$1" == "help" ] || [ "$1" == "-h" ] || [ "$1" == "h" ] || [ "$1" == "-?" ] || [ "$1" == "?" ] ; then | ||
display_help | ||
exit 0 | ||
fi | ||
if [ "$1" == "--version" ] || [ "$1" == "-v" ] || [ "$1" == "version" ] ; then | ||
head -2 ${0} | awk {'print$2"\t"$3'} | ||
exit 0 | ||
fi | ||
### | ||
CLUSTER=${1:-docker-cluster-1} | ||
DISPLAY_HOST=${2:-three-rpi3b} | ||
DATA_DIR=${3:-/usr/local/data/} | ||
HOSTNAME=`hostname` | ||
BOLD=$(tput bold) | ||
NORMAL=$(tput sgr0) | ||
# >>> write to file in ${DATA_DIR}${CLUSTER}/${HOSTNAME} | ||
# mkdir -p ${DATA_DIR}${CLUSTER} | ||
# docker system info | head -5 > ${DATA_DIR}${CLUSTER}/${HOSTNAME} | ||
# Copy file to scroll-display | ||
# echo "copy file" | ||
# scp -i ~/.ssh/id_rsa ${DATA_DIR}${CLUSTER}/${HOSTNAME} uadmin@`hostname -f`:${DATA_DIR}${CLUSTER} | ||
scp -i ~/.ssh/id_rsa [email protected]:${DATA_DIR}${CLUSTER}/one-rpi3b ${DATA_DIR}${CLUSTER} | ||
### |