Update zwave-js-ui-update.sh
This commit is contained in:
parent
cf49c462a7
commit
5419f8fa22
1 changed files with 2 additions and 2 deletions
|
@ -34,10 +34,10 @@ clear
|
||||||
|
|
||||||
echo -en "${GN} Updating Z-wave JS UI... "
|
echo -en "${GN} Updating Z-wave JS UI... "
|
||||||
systemctl stop zwave-js-ui.service
|
systemctl stop zwave-js-ui.service
|
||||||
cd /opt/zwave-js-ui
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null
|
wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null
|
||||||
unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux &>/dev/null
|
unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux &>/dev/null
|
||||||
|
cp -R zwave-js-ui-linux /opt/zwave-js-ui
|
||||||
|
|
||||||
cat << EOF > /etc/systemd/system/zwave-js-ui.service
|
cat << EOF > /etc/systemd/system/zwave-js-ui.service
|
||||||
[Unit]
|
[Unit]
|
||||||
|
@ -54,7 +54,7 @@ EOF
|
||||||
echo -e "${CM}${CL} \r"
|
echo -e "${CM}${CL} \r"
|
||||||
|
|
||||||
echo -en "${GN} Cleanup... "
|
echo -en "${GN} Cleanup... "
|
||||||
rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui
|
rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable --now zwave-js-ui.service
|
systemctl enable --now zwave-js-ui.service
|
||||||
echo -e "${CM}${CL} \n"
|
echo -e "${CM}${CL} \n"
|
||||||
|
|
Loading…
Reference in a new issue