Skip to content

Instantly share code, notes, and snippets.

@p3nj
Created April 29, 2017 11:05
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 p3nj/04d6f0f779ca0b995b34dade68a54d91 to your computer and use it in GitHub Desktop.
Save p3nj/04d6f0f779ca0b995b34dade68a54d91 to your computer and use it in GitHub Desktop.
Ghost update script
#!/bin/bash
##### This script is based on DigitalOcean Ghost w/ nginx setup.
clear
echo "========== Stopping Ghost Service =========="
service ghost stop
sleep 1
echo "========== Download Latest Ghost Script =========="
cd /var/www/
rm -rf ghost*.zip
wget http://ghost.org/zip/ghost-latest.zip
sleep 1
echo "========== Doing Updateing Stuff =========="
rm -rf ghost/core
unzip -uo ghost*.zip -d ghost
chown -R ghost:ghost ghost/*
cd /var/www/ghost
rm -rf node_modules/
npm install --production
echo "========== Restart Ghost Service =========="
service ghost start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment