mirror of https://github.com/tteck/Proxmox.git
Update debian-v3.sh
This commit is contained in:
parent
34450b0836
commit
785ca697b3
|
@ -28,33 +28,23 @@ alias die='EXIT=$? LINE=$LINENO error_exit'
|
||||||
trap die ERR
|
trap die ERR
|
||||||
|
|
||||||
function msg_info() {
|
function msg_info() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -ne " ${HOLD} ${YW}${msg}..."
|
echo -ne " ${HOLD} ${YW}${msg}..."
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_ok() {
|
function msg_ok() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function error_exit() {
|
function error_exit() {
|
||||||
trap - ERR
|
trap - ERR
|
||||||
local DEFAULT="Unknown failure occured."
|
local reason="Unknown failure occured."
|
||||||
local REASON="${1:-$DEFAULT}"
|
local msg="${1:-$reason}"
|
||||||
local FLAG="${RD}‼ ERROR ${CL}$EXIT@$LINE"
|
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
|
||||||
echo -e "$FLAG $REASON" 1>&2
|
echo -e "$flag $msg" 1>&2
|
||||||
exit $EXIT
|
exit $EXIT
|
||||||
}
|
}
|
||||||
function warn() {
|
|
||||||
local REASON="$1"
|
|
||||||
local FLAG="${YW}⚠ WARNING ${CL}"
|
|
||||||
echo -e "$FLAG $REASON"
|
|
||||||
}
|
|
||||||
function info() {
|
|
||||||
local REASON="$1"
|
|
||||||
local FLAG="${BL}ℹ INFO ${CL}"
|
|
||||||
echo -e "$FLAG $REASON"
|
|
||||||
}
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn
|
read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn
|
||||||
|
|
Loading…
Reference in New Issue