mirror of https://github.com/tteck/Proxmox.git
Update zwavejs2mqtt-update.sh
This commit is contained in:
parent
917c650ff5
commit
2a9b48b2d5
|
@ -5,6 +5,22 @@ BL=`echo "\033[36m"`
|
|||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
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 occured."
|
||||
local msg="${1:-$reason}"
|
||||
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
|
||||
echo -e "$flag $msg" 1>&2
|
||||
exit $EXIT
|
||||
}
|
||||
|
||||
echo -en "${GN} Updating Zwavejs2MQTT... "
|
||||
systemctl stop zwavejs2mqtt.service
|
||||
|
|
Loading…
Reference in New Issue