<commit_before>#!/bin/bash
#stop
service nginx stop
forever stopall

#init
mkdir /var/www
mkdir /var/www/html
mkdir /var/www/html/yougou
mkdir /var/www/html/yougou-static
mkdir /var/www/html/yougou-webot
mkdir /var/www/html/yougou-dream

#code
cd /home/yougou/yougou
git reset --hard
git pull

cp -frap api/* /var/www/html/yougou
cp -frap static/* /var/www/html/yougou-static
cp -frap webot/* /var/www/html/yougou-webot
cp -frap dream/* /var/www/html/yougou-dream

#update ngingx
cd /home/yougou/yougou/shells/online/nginx/conf.d
rm -f /etc/nginx/conf.d/*
cp -f *.conf /etc/nginx/conf.d

#777
mkdir /var/www/html/yougou/protected/runtime
chmod 777 /var/www/html/yougou/protected/runtime
chown nginx:nginx -R /var/www/html/*

service php-fpm restart

#webot
cd /var/www/html/yougou-webot
#npm update
cd /var/www/html/yougou-webot/conf
mv -f index.online.js index.js

#sed
mobile_build_version=`date +%Y%m%d%s`
sed -i "s#mobile_build_version#${mobile_build_version}#g" `grep -lr mobile_build_version /var/www/html/yougou-webot/*`
sed -i "s#mobile_build_version#${mobile_build_version}#g" `grep -lr mobile_build_version /var/www/html/yougou-static/*`

sed -i "s#localhost:3001#192.168.3.11:3001#g" `grep -lr localhost:3001 /var/www/html/yougou-static/*`

#start
cd /var/www/html/yougou-webot
forever start -l webot.log -a app.js
cd /var/www/html/yougou-dream
npm update
#forever start -l dream.log -a bin/www

service nginx start
<commit_msg>hot fix<commit_after>#!/bin/bash
#stop
service nginx stop
forever stopall

#init
mkdir /var/www
mkdir /var/www/html
mkdir /var/www/html/yougou
mkdir /var/www/html/yougou-static
mkdir /var/www/html/yougou-webot
mkdir /var/www/html/yougou-dream

#code
cd /home/yougou/yougou
git reset --hard
git pull

cp -frap api/* /var/www/html/yougou
cp -frap static/* /var/www/html/yougou-static
cp -frap webot/* /var/www/html/yougou-webot
cp -frap dream/* /var/www/html/yougou-dream

#update ngingx
cd /home/yougou/yougou/shells/online/nginx/conf.d
rm -f /etc/nginx/conf.d/*
cp -f *.conf /etc/nginx/conf.d

#777
mkdir /var/www/html/yougou/protected/runtime
chmod 777 /var/www/html/yougou/protected/runtime
chown nginx:nginx -R /var/www/html/*

service php-fpm restart

#webot
cd /var/www/html/yougou-webot
#npm update
cd /var/www/html/yougou-webot/conf
mv -f index.online.js index.js

#sed
mobile_build_version=`date +%Y%m%d%s`
sed -i "s#mobile_build_version#${mobile_build_version}#g" `grep -lr mobile_build_version /var/www/html/yougou-webot/*`
sed -i "s#mobile_build_version#${mobile_build_version}#g" `grep -lr mobile_build_version /var/www/html/yougou-static/*`

localhost_url=`localhost:3001`
online_url=`192.168.3.11:3001`
sed -i "s#${localhost_url}#${online_url}#g" `grep -lr ${localhost_url} /var/www/html/yougou-dream/*`

#start
cd /var/www/html/yougou-webot
forever start -l webot.log -a app.js
cd /var/www/html/yougou-dream
npm update
#forever start -l dream.log -a bin/www

service nginx start

{'fraction_non_alphanumeric': 0.15479031708148652, 'fraction_numerical': 0.017047391749062394, 'mean_word_length': 3.989795918367347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 38, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5089275', 'n_tokens_mistral': 1329, 'n_tokens_neox': 1254, 'n_words': 253}