diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-09-06 17:56:01 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-09-06 17:56:01 +0300 |
commit | 14dcde44054c6fae2cbe15c397d2fb711647c3ce (patch) | |
tree | 6fbc5ed3f4d74e35e728447a733ed0b7fecb97bc | |
parent | 6a81ce686d3e6335fc9a90f185e17d18aac17374 (diff) |
nc-automount: more logging and safety delayv0.26.12
-rw-r--r-- | etc/nextcloudpi-config.d/nc-automount.sh | 2 | ||||
-rwxr-xr-x | update.sh | 11 |
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 @@ -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 #( |