1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/Makefile
Zack Scholl bb57d1ed67 Updated Makefile
Former-commit-id: 4748f694c5dfdca76f844d10cc8de07fe832ef1c [formerly c0fc8491379c96efaad4c510ba53ba573b2b17d4] [formerly 902748fbcbf673d7fce1c1449365d3b0b2fc90c6 [formerly 8142635dd2]]
Former-commit-id: 2ed6596ad41330de8e40cd978c4087ca99481fda [formerly 9bbac225895af026f1defec7861260ab51af100e]
Former-commit-id: 63b0895880156600b813001c6d11ce0108739bea
2016-02-10 14:11:26 -05:00

32 lines
1.0 KiB
Makefile

ADDRESS = awwkoala.com
PORT = 8003
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