Skip to content

Instantly share code, notes, and snippets.

@doostinharrell
Created May 11, 2015 22:26
Show Gist options
  • Save doostinharrell/3ced9fac81034215f2f8 to your computer and use it in GitHub Desktop.
Save doostinharrell/3ced9fac81034215f2f8 to your computer and use it in GitHub Desktop.
live.sh - Create .haccess files for live environments
#!/bin/sh
#to run this command type: sh install.sh sitename
if [ -e $1 ];
then
echo "ERROR: please supply site name ie: thewiredmouse"
exit 1
fi
sudo echo "Starting scripts"
PARENT=$(basename $(pwd))
#update .htaccess files for live server deployment
find /home/$1/public_html -name ".htaccess" -type f -exec sed -i 's/SymLinksIfOwnerMatch/FollowSymLinks/g' {} ";"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment