Skip to content

Instantly share code, notes, and snippets.

@konecnyna
Created January 19, 2018 17:42
Show Gist options
  • Save konecnyna/dc31bef28c97f0e8d8e1a5b48b8d975f to your computer and use it in GitHub Desktop.
Save konecnyna/dc31bef28c97f0e8d8e1a5b48b8d975f to your computer and use it in GitHub Desktop.
#!/bin/bash
declare -a arr=("/root/slack-cat" "/root/etsyalumni/slack-cat" "/root/stash/slack-cat")
pwd=$(pwd)
for i in "${arr[@]}"
do
echo "Updating: $i"
cd $i
git pull; NODE_ENV="production" pm2 restart index.js
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment