mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
Update zwavejs2mqtt-v3.sh
This commit is contained in:
parent
f2a2f69f35
commit
f3e0d39a7a
1 changed files with 17 additions and 0 deletions
|
@ -14,6 +14,23 @@ CM="${GN}✓${CL}"
|
|||
CROSS="${RD}✗${CL}"
|
||||
APP="Zwavejs2MQTT"
|
||||
NSAPP=$(echo ${APP,,} | tr -d ' ')
|
||||
set -o errexit
|
||||
set -o errtrace
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
shopt -s expand_aliases
|
||||
alias die='EXIT=$? LINE=$LINENO error_exit'
|
||||
trap die ERR
|
||||
|
||||
function error_exit() {
|
||||
trap - ERR
|
||||
local reason="Unknown failure occurred."
|
||||
local msg="${1:-$reason}"
|
||||
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
|
||||
echo -e "$flag $msg" 1>&2
|
||||
exit $EXIT
|
||||
}
|
||||
|
||||
while true; do
|
||||
read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn
|
||||
case $yn in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue