Skip to content

Instantly share code, notes, and snippets.

@monobilisim
Last active June 23, 2016 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save monobilisim/6814703 to your computer and use it in GitHub Desktop.
Save monobilisim/6814703 to your computer and use it in GitHub Desktop.
#!/bin/sh
if grep -qs '//192.168.1.4/Santral_Ses_Kaydi' /proc/mounts; then
echo "disk mount edilmis. islem yapilmadi."
else
STAMP=`date '+%Y-%m-%d %H:%M:%S'`
echo "disk mount edilmemis."
mount -o 'username=ses,password=ses' //192.168.1.4/Santral_Ses_Kaydi /mnt/monitor
echo "$STAMP: disk mount edildi." >> /var/log/mounted.log
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment