Created
November 5, 2011 23:59
-
-
Save gabrtv/1342227 to your computer and use it in GitHub Desktop.
Node.js Upgrade Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# upgrade packages | |
sudo apt-get update && sudo apt-get dist-upgrade -y --force-yes | |
# upgrade node application | |
cat > /tmp/upgrade <<EOF | |
#!/bin/sh | |
cd app | |
git pull --rebase | |
npm install | |
EOF | |
chmod +x /tmp/upgrade | |
/tmp/upgrade | |
# restart service | |
sudo restart nodejs | |
date > /tmp/date-of-last-upgrade |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment