Skip to content

Commit aa1cb84

Browse files
committed
🚨 another fix for v4 upgrades
1 parent f08a6c7 commit aa1cb84

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pre_update.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
# shellcheck disable=SC1091,2016,2154
44
. /etc/rc.subr && load_rc_config
55

6-
if [ "${plugin_ver}" == "ver_0.4.0" ] && [ "${homeassistant_user}" == "hass" ]; then
7-
warn "BREAKING CHANGES - The 'hass' username is no longer supported."
8-
elif [ "${plugin_ver}" == "ver_0.4.0" ] && [ "${homeassistant_user}" == "homeassistant" ]; then
6+
if [ "${homeassistant_user}" == "hass" ]; then
7+
warn "Manual intervention is required!"
8+
warn "BREAKING CHANGES - The 'hass' username is no longer supported"
9+
err 1 "Please see the wiki for details"
10+
elif [ -n "${plugin_ver}" ] && [ "${homeassistant_user}" == "homeassistant" ]; then
911
sysrc -x plugin_ver 2>/dev/null
1012
sysrc -x homeassistant_library_path 2>/dev/null
1113
sysrc -x homeassistant_cpath 2>/dev/null
@@ -22,6 +24,6 @@ if [ "${plugin_version%%.*}" == "5" ]; then
2224
elif [ "${plugin_version%%-*}" == "v6" ]; then
2325
exit 0
2426
else
25-
warn "Manual intervention is required!"
26-
err 1 "Please see the wiki for breaking changes."
27+
warn "Unknown Version -- You shouldn't be here!"
28+
err 1 "Please reinstall this plugin"
2729
fi

0 commit comments

Comments
 (0)