Skip to content

Instantly share code, notes, and snippets.

@syuilo
Created January 31, 2016 08:24
Show Gist options
  • Save syuilo/8611ab4f4d73afa2e859 to your computer and use it in GitHub Desktop.
Save syuilo/8611ab4f4d73afa2e859 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "$(ps axc | grep -P 'deploy$' | wc -l)" -gt 2 ]; then
echo '他のdeployが実行中です。強制終了させるにはkillall deployをしてください。'
exit
fi
cd /var/misskey-api
echo -e "\e[32m--- Stoping process...\e[m"
forever stop $(pwd)/misskey-api.js
echo -e "\e[32m--- Installing...\e[m"
npm install MissKernel/Misskey-API#master
cd ./node_modules/misskey-api
npm install
npm run dts
npm run build
cd ../../
echo -e "\e[32m--- Starting process...\e[m"
forever start $(pwd)/misskey-api.js
forever list
echo -e "\e[32m--- Finish!\e[m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment