Browse Source

Fix running test

Joachim M. Giæver 3 years ago
parent
commit
61425d9504
2 changed files with 2 additions and 3 deletions
  1. 1 2
      snap/snapcraft.yaml
  2. 1 1
      src/bin/env-wrapper

+ 1 - 2
snap/snapcraft.yaml

@@ -158,5 +158,4 @@ parts:
       LIB_OZWDB=$(dirname "$(find ${INSTALL_PATH} -name libqt-openzwavedatabase.so.1 -print -quit)")
       export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBQT_OZW:$LIB_OZW:$LIB_OZWDB
       OZWD=$(find ${INSTALL_PATH} -type f -name ozwdaemon -print -quit)
-      VERSION=$($OZWD --version | cut -f2 -d ' ')
-      snapcraftctl set-version "${VERSION}"
+      snapcraftctl set-version "$($OZWD --version | cut -f2 -d ' ')"

+ 1 - 1
src/bin/env-wrapper

@@ -58,7 +58,7 @@ for ((i = 0; i < $#; i++)); do
     fi
 done
 
-if [ $(snapctl services ozwdaemon | grep active | wc -l) -gt 0 -a ${OPT_HELP} = false ]; then
+if [ $(snapctl services ozwdaemon | grep inactive | wc -l) -eq 0 -a ${OPT_HELP} = false ]; then
     lprint "Service already running, showing help text."
     lprint "Use: 'snap stop ${SNAP_NAME}' to stop the service and'"
     lprint "to execute the ozwdaemon manually"