Skip to content

Instantly share code, notes, and snippets.

@ctgswallow
Created September 20, 2012 20:41
Show Gist options
  • Save ctgswallow/3758225 to your computer and use it in GitHub Desktop.
Save ctgswallow/3758225 to your computer and use it in GitHub Desktop.
fix-graphite.sh
#!/bin/bash
/usr/bin/chef-client
rm -f /opt/graphite/webapp/graphite/settings.pyc /opt/graphite/webapp/graphite/settings.py
if [ -d "/var/chef/cache/graphite-web-0.9.10" ]; then
cd /var/chef/cache/graphite-web-0.9.10
python setup.py install
elif [ -d "/var/cache/chef/graphite-web-0.9.10" ]; then
cd /var/cache/chef/graphite-web-0.9.10
python setup.py install
fi
cd /opt/graphite/webapp/graphite
python -c "import py_compile ; py_compile.compile('settings.py')"
for i in apache2 carbon-cache carbon-relay; do
service $i stop
service $i start
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment