1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/Makefile
Zack Scholl 56725bca72 Updated makefile
Former-commit-id: f790c5b5971f93368795af12669efa98e251d504 [formerly 18fcb6447d4483d18eeab31a09d1f2af5b821819] [formerly 2774b502c293cc8c722f71e90915cc6413f14d14 [formerly 88a7bd4e1acb4d5accdb12de57abfb95976e1297 [formerly c8dbac7485]]]
Former-commit-id: 486053c152a201c69276786b47563ac2684b0cbb [formerly 15105c5550c5b4f35720a3c195ea7abe068ce856]
Former-commit-id: ebea15f259bbc0e5bc3fe6584c206046860a561a
Former-commit-id: d7bf986ddf
2016-02-10 14:07:32 -05:00

32 lines
1.0 KiB
Makefile

ADDRESS = awwkoala.com
PORT = 8002
CUR_DIR = $(shell bash -c 'pwd')
USERCUR = $(shell bash -c 'whoami')
make:
go build
install:
rm -rf jinstall
mkdir jinstall
cp install/awwkoala.nginx jinstall/awwkoala.nginx
sed -i 's/PORT/$(PORT)/g' jinstall/awwkoala.nginx
sed -i 's/ADDRESS/$(ADDRESS)/g' jinstall/awwkoala.nginx
sed -i 's^CUR_DIR^$(CUR_DIR)^g' jinstall/awwkoala.nginx
cp install/awwkoala.init jinstall/awwkoala.init
sed -i 's/EXT_ADDRESS/$(ADDRESS)/g' jinstall/awwkoala.init
sed -i 's^CUR_DIR^$(CUR_DIR)^g' jinstall/awwkoala.init
sed -i 's^USERCUR^$(USERCUR)^g' jinstall/awwkoala.init
sed -i 's^PORT^$(PORT)^g' jinstall/awwkoala.init
cp jinstall/awwkoala.init /etc/init.d/awwkoala.init
chmod +x /etc/init.d/awwkoala.init
cp jinstall/awwkoala.nginx /etc/nginx/sites-available/awwkoala.nginx
ln -fs /etc/nginx/sites-available/awwkoala.nginx /etc/nginx/sites-enabled/awwkoala.nginx
/etc/init.d/nginx reload
/etc/init.d/nginx restart
/etc/init.d/awwkoala.init restart
rm -rf jinstall
.PHONY: install