Skip to content

Instantly share code, notes, and snippets.

@jyalim
Last active August 29, 2015 14:21
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 jyalim/495529f4bdc7c5b5710b to your computer and use it in GitHub Desktop.
Save jyalim/495529f4bdc7c5b5710b to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
stime=$((30*60)) # 30 min
app_path=$HOME/eth-net-intelligence-api
app_file=$app_path/app.json
cd $app_path
pm2 start $app_file
while true; do
sleep $stime
pm2 gracefulReload node-app
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment