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:
authornachoparker <nacho@ownyourbits.com>2018-04-06 14:52:18 +0300
committernachoparker <nacho@ownyourbits.com>2018-04-09 11:38:46 +0300
commita9b37ab6c6faf6862e61eaf061349eb2aa805fe7 (patch)
treee2ba30fb9101d1b2a73997b60e0c4c916253caac /update.sh
parent7aba9c53037011baeab73dd5036b8420bfac5aa1 (diff)
nc-automount: remove directories left from unclean shutdownv0.53.26
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