diff --git a/.DS_Store b/.DS_Store index 2728af8..89a4afa 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/ServiceResources b/ServiceResources index 5806aee..cd0c0e2 100755 --- a/ServiceResources +++ b/ServiceResources @@ -25,6 +25,7 @@ # so code here operates on both directories victronServicesDir="/opt/victronenergy/service" +overlayWorkDir="/run/overlays/service" if [ -d "$victronServicesDir" ]; then serviceDir="$victronServicesDir" serviceOverlay=true @@ -53,9 +54,6 @@ _startService () svc -u "/service/$pkg" if [ -e "$serviceDir/$pkg/log" ]; then rm -f "$serviceDir/$pkg/log/down" - if $serviceOverlay ; then - rm -f "/service/$pkg/log/down" - fi svc -u "/service/$pkg/log" fi } @@ -109,14 +107,14 @@ _removeService () { local pkg=$1 # stop the service - svc -d "/service/$pkg" + _stopService $pkg - # remove the active service directory + # remove the service directory # removing the service in the overlayed service directory doesn't remove it from /service - # so that needs to be removed FIRST - rm -rf "/service/$pkg" + # it needs to be removed from the overlay work directory also + rm -rf "$serviceDir/$pkg" if $serviceOverlay ; then - rm -rf "$serviceDir/$pkg" + rm -rf "$overlayWorkDir/$pkg" fi # kill related processes _killServiceProcesses $pkg @@ -162,12 +160,12 @@ installService () local serviceRestartNeeded=false if [ -L "$serviceDir/$pkg" ]; then - logMessage "$pkg removing old service (was symbolic link)" - _removeService $pkg + logMessage "removing old $pkg service (was symbolic link)" + rm -f "$serviceDir/$pkg" fi # service not yet installed, COPY service directory to the active locaiton if [ ! -e "$serviceDir/$pkg" ]; then - logMessage "$pkg installing service" + logMessage "installing $pkg service" cp -R "$scriptDir/service" "$serviceDir/$pkg" # service already installed - only copy changed files, then restart service else diff --git a/setup b/setup index eb15c0a..2ef68d1 100755 --- a/setup +++ b/setup @@ -18,9 +18,9 @@ if [ $scriptAction == 'NONE' ] ; then # NOTE: if new settings are added in the future, change test for that one # to avoid creating that new parameter !!!! - lastSetting=$(dbus-send --system --print-reply=literal --dest=com.victronenergy.settings /Settings/GuiModsCheckingPackage\ - com.victronenergy.BusItem.GetValue 2> /dev/null | awk '{print $3}') - if [ -z $lastSetting ]; then + dbus-send --system --print-reply=literal --dest=com.victronenergy.settings /Settings/GuiMods/CheckingPackage\ + com.victronenergy.BusItem.GetValue &> /dev/null + if (( $? != 0 )); then logMessage "creating SetupHelper Settings" dbus -y com.victronenergy.settings /Settings AddSettings\ '%[ {"path": "/GuiMods/GitHubAutoUpdate", "default":0},\ diff --git a/version b/version index b001f9f..92491a0 100644 --- a/version +++ b/version @@ -1 +1 @@ -v2.4 +v2.5