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>2017-09-06 17:56:01 +0300
committernachoparker <nacho@ownyourbits.com>2017-09-06 17:56:01 +0300
commit14dcde44054c6fae2cbe15c397d2fb711647c3ce (patch)
tree6fbc5ed3f4d74e35e728447a733ed0b7fecb97bc
parent6a81ce686d3e6335fc9a90f185e17d18aac17374 (diff)
nc-automount: more logging and safety delayv0.26.12
-rw-r--r--etc/nextcloudpi-config.d/nc-automount.sh2
-rwxr-xr-xupdate.sh11
2 files changed, 13 insertions, 0 deletions
diff --git a/etc/nextcloudpi-config.d/nc-automount.sh b/etc/nextcloudpi-config.d/nc-automount.sh
index dfaa620a..d7fbf496 100644
--- a/etc/nextcloudpi-config.d/nc-automount.sh
+++ b/etc/nextcloudpi-config.d/nc-automount.sh
@@ -97,6 +97,8 @@ EOF
#!/bin/bash
inotifywait --monitor --event create --event delete --format '%f %e' /media/ | \
grep --line-buffered ISDIR | while read f; do
+ echo $f
+ sleep 0.5
/usr/local/etc/nc-automount-links
done
EOF
diff --git a/update.sh b/update.sh
index fe2ec69f..ddfcbd31 100755
--- a/update.sh
+++ b/update.sh
@@ -114,6 +114,17 @@ EOF
# disable SMB1 and SMB2
grep -q SMB3 /etc/samba/smb.conf || sed -i '/\[global\]/aprotocol = SMB3' /etc/samba/smb.conf
+ # improvements to automount-links
+ cat > /usr/local/etc/nc-automount-links-mon <<'EOF'
+#!/bin/bash
+inotifywait --monitor --event create --event delete --format '%f %e' /media/ | \
+ grep --line-buffered ISDIR | while read f; do
+ echo $f
+ sleep 0.5
+ /usr/local/etc/nc-automount-links
+done
+EOF
+ chmod +x /usr/local/etc/nc-automount-links-mon
# restart PHP to get updates in the ncp-web
# FIXME: php doesn't come up if run from ncp-web
#(