mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-17 00:51:46 +00:00
...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a3dd84af4c
commit
5b1ce468d7
@ -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)
|
||||
|
||||
31
check-status
31
check-status
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user