Skip to content

Instantly share code, notes, and snippets.

@koko-u
Created May 2, 2011 04:36
Show Gist options
  • Save koko-u/951181 to your computer and use it in GitHub Desktop.
Save koko-u/951181 to your computer and use it in GitHub Desktop.
pogoplugでファイルをmount / umount
#!/bin/sh
mountpoint=/mnt/pogoplug
# find the current state of pogoplug
state=`pgrep pogoplugfs`
# if off, turn on, else off.
if [ "$state" = "" ]; then
pogoplugfs --user <email-address> --password <pogoplug_password> --mountpoint $mountpoint > /dev/null 2>&1 &
else
echo <sudo_password> | sudo -S umount $mountpoint
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment