Originally Posted by
pdc124
did you fiux this - ive got a bash scripts that mounts and unmounts windows shares and its stopped working .
smbmount works but smbumount generates and error
oh yea, Sorry. I should have posted for posterity.
You want to use: umount -f /mount/path
Here is my updated script:
Code:
#!/bin/bash
synclog=/home/mmoser/logs/rsync_$(date +%Y%m%d).log
dir=/media/dump/www
if [ ! -d "$dir" ]; then
#mount destination
smbmount //192.168.76.11/_darcyDump /media/dump -o username=xxx,password=xxx,uid=mmoser rw
fi
if [ -d "$dir" ]; then
#kick off sync
rsync -rltEvqz --del --log-file=$synclog /storage/ /media/dump
#clean up
umount -f /media/dump
else
echo "mount failed, check IP"
fi
I've also thrown in some mount checks since my last post.
Bookmarks