Skip to content

Commit

Permalink
nc-automount: more logging and safety delay
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Sep 6, 2017
1 parent 6a81ce6 commit 14dcde4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions etc/nextcloudpi-config.d/nc-automount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
#(
Expand Down

0 comments on commit 14dcde4

Please sign in to comment.