Joachim M. Giæver 3 лет назад
Родитель
Сommit
e8d73ae44a
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      src/hooks/connect-plug-zui-store

+ 4 - 3
src/hooks/connect-plug-zui-store

@@ -22,14 +22,15 @@ if snapctl is-connected zui-store; then
 		mv -f "${ZUI_STORE}/zwave"*.{log,json} "${ZUI_STORE}/.z2m-logs" 2> /dev/null; true
 		mv -f "${ZUI_STORE}/zwave"*.{log,json} "${ZUI_STORE}/.z2m-logs" 2> /dev/null; true
 		lprint "Everything seems to be in place now... Exit connection the initiate the daemonizing voting"
 		lprint "Everything seems to be in place now... Exit connection the initiate the daemonizing voting"
 		lprint "ZUI-STORE: $(ls -a "${ZUI_STORE}")"
 		lprint "ZUI-STORE: $(ls -a "${ZUI_STORE}")"
-		if [ -s "${ZUI_STORE}/.install.hook.service" ]; then
-			if [ "$(cat "${ZUI_STORE}/.install.hook.service")" == "enable" ]; then
+		SERVICE_FILE="${ZUI_STORE}/.install.hook.service"
+		if [ -s "${SERVICE_FILE}" ]; then
+			if [ "$(cat "${SERVICE_FILE}")" == "enable" ]; then
 				lprint "ZUI will be enabled. Disable ${SNAP_NAME}."
 				lprint "ZUI will be enabled. Disable ${SNAP_NAME}."
 			else
 			else
 				lprint "ZUI won't be enabled. Keep ${SNAP_NAME} enabled."
 				lprint "ZUI won't be enabled. Keep ${SNAP_NAME} enabled."
 			fi
 			fi
 		else
 		else
-			lprint "The service file for ZUI is missing. Keep ${SNAP_NAME} enabled."
+			lprint "The service file for ZUI (${SERVICE_FILE}) is missing. Keep ${SNAP_NAME} enabled."
 		fi
 		fi
 		exit 1
 		exit 1
 	else
 	else