Skip to content

Commit

Permalink
✏️ rename scripts
Browse files Browse the repository at this point in the history
Probably an issue in my own mind, but zj2m != z2m. Subtle difference... I know. But I’ll sleep better tonight :)

...and I like this naming convention better
  • Loading branch information
tprelog committed Feb 13, 2021
1 parent 987854a commit c41b4dc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ get_latest_release() {
cd "${workdir}"/*zwavejs2mqtt* || return 1
}

build_z2m() {
build_zj2m() {
## This build function is based on zwavejs2mqtt/docker/Dockerfile
local updateDevices
local zwavejs="https://github.com/zwave-js/node-zwave-js"
Expand Down Expand Up @@ -44,7 +44,7 @@ build_z2m() {
fi
}

install_z2m() {
install_zj2m() {
local app_dir="${zwavejs2mqtt_app_dir}"
## clean-up additional files and folders
find . -mindepth 1 -name '.*' -exec rm -r -- "{}" +
Expand All @@ -58,7 +58,7 @@ install_z2m() {
}

get_latest_release \
&& build_z2m \
&& install_z2m \
&& build_zj2m \
&& install_zj2m \
|| echo -e "\ninstall failed :("
rm -r -- "${workdir}"
4 changes: 2 additions & 2 deletions overlay/root/bin/menu
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ show_banner_0() {
clear
echo "${blu}"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Manage the Z-WaveJS 2 MQTT Service "
echo " MANAGE THE Z-WAVE JS TO MQTT SERVICE "
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo -ne "${end}"
}
Expand All @@ -28,7 +28,7 @@ service_menu() {
goodbye ; exit 0
;;
"upgrade")
/root/bin/z2m-upgrade
/root/bin/upgrade_zj2m
pause ; break
;;
"status"|"restart"|"start"|"stop")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

/root/bin/z2m-install \
/root/bin/install_zj2m \
&& service zwavejs2mqtt restart
4 changes: 2 additions & 2 deletions post_install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

plugin_version="1.0.20210211"
plugin_version="1.0.20210212"
sysrc plugin_initialized="1.0.$(date +%Y%m%d)"
sysrc plugin_version="${plugin_version}"

Expand All @@ -9,7 +9,7 @@ sysrc zwavejs2mqtt_app_dir=/usr/local/share/zwavejs2mqtt
sysrc zwavejs2mqtt_store_dir=/usr/local/etc/zwavejs2mqtt

## Install the jail's primary service, zwavejs2mqtt
/root/bin/z2m-install
/root/bin/install_zj2m

## Enable and start the service
sysrc zwavejs2mqtt_enable="YES"
Expand Down
4 changes: 2 additions & 2 deletions post_update.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# version 1.0-r20210211
# version 1.0-r20210212

# shellcheck disable=SC1091
. /etc/rc.subr && load_rc_config
Expand All @@ -18,7 +18,7 @@ install_pkglist() {
upgrade_service() {
## If enabled, upgrade zwavejs2mqtt during a Plugin UPDATE
## Use `sysrc plugin_upgrade_service=YES` to enable
/root/bin/z2m-install \
/root/bin/install_zj2m \
&& sysrc zwavejs2mqtt_enable="YES" \
&& service zwavejs2mqtt start
}
Expand Down
2 changes: 1 addition & 1 deletion pre_update.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# version 1.0-r20210211
# version 1.0-r20210212

# shellcheck disable=SC1091
. /etc/rc.subr && load_rc_config
Expand Down

0 comments on commit c41b4dc

Please sign in to comment.