Actualización de Ghost en Linux:

  • Reemplazar Paths Vars
  • Se Utiliza Forever para Start / Stop.

# Paths Vars

PATH_BKPGHOST=/data/ghost-$(date +%m-%d-%Y)
PATH_GHOST=/data/ghost
PATH_TMPGHOST=/data/new_ghost

# Backup

cp -pr $PATH_GHOST $PATH_BKPGHOST

# Stop GHOST

cd $PATH_GHOST ; forever stop index.js

# Bajar

mkdir $PATH_TMPGHOST
cd $PATH_TMPGHOST
curl -L https://ghost.org/zip/ghost-latest.zip -o
ghost.zip
unzip ghost.zip
rm -f ghost.zip

# Copy Core

cd $PATH_TMPGHOST
cp -f *.md *.js *.json $PATH_GHOST/
cp -Rf core $PATH_GHOST/
cp -Rf content/themes/casper $PATH_GHOST/content/themes

# Install

cd $PATH_GHOST
npm install --production

# Start GHOST

cd $PATH_GHOST
NODE_ENV=production forever start index.js

# Remove Temp Ghost

rm -rf $PATH_TMPGHOST