35 lines
1.2 KiB
Bash
35 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
# compiling
|
|
|
|
cd /app/hm_stud && make && rm -rf cert/test* && cd cert && sh gen_cert.sh
|
|
make -C /app/hm_gameserver
|
|
make -C /app/hm_lobbyserver
|
|
cd /app/hm_nginx && sed "s@\/usr\/local\/web@$(pwd)\/..\/hm_web\/@" conf/hm_nginx.conf > conf/nginx.conf && ./configure --with-http_ssl_module && make && make install
|
|
cd /app/hm_sunwell/examples && npm install
|
|
|
|
# start
|
|
|
|
mkdir -p /app/hm_log
|
|
# Start the servers
|
|
/app/hm_gameserver/hm_gameserver --log=/app/hm_log/hm_gameserver_$(date +%s).log
|
|
/app/hm_lobbyserver/hm_lobbyserver --gameserver=104.131.186.231 --log=/app/hm_log/hm_lobbyserver_$(date +%s).log
|
|
# Start stud
|
|
/app/hm_stud/stud /app/hm_stud/cert/test.com.pem
|
|
# Start fcgi
|
|
spawn-fcgi -d /app/hm_web/ -f /app/hm_web/app.py -a 127.0.0.1 -p 9002
|
|
# Start nginx
|
|
/app/hm_nginx/objs/nginx
|
|
/bin/bash -c 'cd /app/hm_sunwell && nodejs examples/server hm_sunwell > /app/hm_log/nodejs_server_$(date +%s).log 2>&1' &
|
|
|
|
# bucket create
|
|
|
|
/opt/couchbase/bin/couchbase-cli bucket-create -c "localhost:8091" --bucket=hbs --bucket-password=aci --bucket-type=couchbase --bucket-ramsize=200 --bucket-replica=1 --wait
|
|
|
|
# bucket restore
|
|
|
|
/opt/couchbase/bin/cbrestore /app/hm_database/hbs http://localhost:8091/ --bucket-source=hbs
|
|
|
|
tail -f /dev/null
|
|
|