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
parent7aba9c53037011baeab73dd5036b8420bfac5aa1 (diff)
nc-automount: remove directories left from unclean shutdownv0.53.26
-rw-r--r--changelog.md4
-rw-r--r--etc/nextcloudpi-config.d/nc-automount.sh1
-rwxr-xr-xupdate.sh4
3 files changed, 8 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 9044a9fc..c8d81157 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,7 @@
-[v0.53.25](https://github.com/nextcloud/nextcloudpi/commit/bb33a59) (2018-04-09) build: clean docker-env
+[v0.53.26](https://github.com/nextcloud/nextcloudpi/commit/ca66f50) (2018-04-06) nc-automount: remove directories left from unclean shutdown
+
+[v0.53.25](https://github.com/nextcloud/nextcloudpi/commit/c5bbeb8) (2018-04-09) build: clean docker-env
[v0.53.24](https://github.com/nextcloud/nextcloudpi/commit/1c44802) (2018-04-05) ncp-web: faster first load by asynchronous call to is_active()
diff --git a/etc/nextcloudpi-config.d/nc-automount.sh b/etc/nextcloudpi-config.d/nc-automount.sh
index 3ffaf1ae..08cbc86a 100644
--- a/etc/nextcloudpi-config.d/nc-automount.sh
+++ b/etc/nextcloudpi-config.d/nc-automount.sh
@@ -42,6 +42,7 @@ Before=mysqld.service dphys-swapfile.service fail2ban.service smbd.service nfs-s
[Service]
Restart=always
+ExecStartPre=/bin/bash -c "rmdir /media/* || true"
ExecStart=/usr/bin/udiskie -NTF
[Install]
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