Created
January 31, 2016 08:24
-
-
Save syuilo/8611ab4f4d73afa2e859 to your computer and use it in GitHub Desktop.
This file contains 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/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