Skip to content

Instantly share code, notes, and snippets.

@tsabat
Created June 28, 2013 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsabat/5887028 to your computer and use it in GitHub Desktop.
Save tsabat/5887028 to your computer and use it in GitHub Desktop.
#!/bin/bash -e verbose
grep "codepen_fstab_setup" /etc/fstab
if [ $? -eq 1 ]; then
echo "# codepen_fstab_setup" | tee -a /etc/fstab
echo "/dev/xvdf /cp xfs noatime 0 0" | tee -a /etc/fstab
echo "/cp/codepen /home/deploy/codepen none bind" | tee -a /etc/fstab
fi
if [ $? -eq 0 ]; then
if [ ! -d /cp ]; then
mkdir -m 000 /cp
fi
if [ ! -d /home/deploy/codepen ]; then
mkdir -m 000 -p /home/deploy/codepen
fi
mount -a
else
echo FAIL
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment