Skip to content

Commit

Permalink
nc-automount: improve links
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Sep 2, 2017
1 parent ee74875 commit 3393477
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions etc/nextcloudpi-config.d/nc-automount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@ ls -d /media/* &>/dev/null && {
# create links
i=0
for d in `ls -d /media/*`; do
[ $i -eq 0 ] && \
ln -sT "$d" /media/USBdrive || \
ln -sT "$d" /media/USBdrive$i
if [ $i -eq 0 ]; then
mountpoint -q "$d" && ln -sT "$d" /media/USBdrive
else
mountpoint -q "$d" && ln -sT "$d" /media/USBdrive$i
fi
i=$(( i + 1 ))
done
}
EOF
chmod +x /usr/local/etc/nc-automount-links
Expand Down
2 changes: 1 addition & 1 deletion etc/nextcloudpi-config.d/nc-notify-updates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ VERFILE=/usr/local/etc/ncp-version
LATEST=/var/run/.ncp-latest-version
NOTIFIED=/var/run/.ncp-version-notified
test -e \$LATEST || exit 0;
test -e \$LATEST || exit 0;
ncp-test-updates || { echo "NextCloudPi up to date"; exit 0; }
test -e \$NOTIFIED && [[ "\$( cat \$LATEST )" == "\$( cat \$NOTIFIED )" ]] && {
Expand Down

0 comments on commit 3393477

Please sign in to comment.