Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-07-02 23:31:03 +03:00
parent a3dd84af4c
commit 5b1ce468d7
2 changed files with 34 additions and 1 deletions

View File

@ -5,6 +5,7 @@ CT_DIR=${CT_DIR:=/etc/pve/lxc/}
#----------------------------------------------------------------------
#QUIET=
#DRY_RUN=
@(){
@ -19,7 +20,8 @@ CT_DIR=${CT_DIR:=/etc/pve/lxc/}
#----------------------------------------------------------------------
# get CT hostname...
# CT hostname <-> id...
ct2hostname(){
local ct=${CT_DIR}/${1}.conf
local host=$(cat $ct | grep hostname | head -1)

View File

@ -12,6 +12,37 @@ HTTP_OK_STATUS=${HTTP_OK_STATUS:='2[0-9][0-9]|30[1-9]|401|501'}
#----------------------------------------------------------------------
# Help...
case $1 in
-h|--help)
echo "Do a status check on URL(s)."
echo
echo "Suage:"
echo " `basename $0` URL ..."
echo
echo "Supported URL formats and schemes:"
echo " http://<url>"
echo " https://<url>"
echo " Check if <url> is reachable via http/https."
echo " ssh://<url>[:<port>]"
echo " Check if <url> has an open port with a listening ssh server."
echo " git://<url>[:<port>]"
echo " The same as ssh://..."
echo " ovpn://<url>[:<port>]"
echo " Check if an OpenVPN server is listening on <url>."
echo " NOTE: this will not work if 'tls-auth' is enabled but the thing was"
echo " already implemented when I found out about this."
echo " lxc://<ct-id>:<comman>:<args>"
echo " Proxmox-specific set of checks."
exit
;;
*)
;;
esac
#----------------------------------------------------------------------
source .pct-helpers