Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/update.sh b/update.sh
index 16a56a4d..82a26d5f 100755
--- a/update.sh
+++ b/update.sh
@@ -174,6 +174,10 @@ EOF
systemctl stop log2ram
}
+ # remove directories left from unclean shutdown
+ UNIT=/usr/lib/systemd/system/nc-automount.service
+ grep -q rmdir "$UNIT" || sed -i '/^ExecStart=/iExecStartPre=/bin/bash -c "rmdir /media/* || true"' "$UNIT"
+
} # end - only live updates
exit 0