1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/Makefile
Zack Scholl 6f505a3117 Added makefile
Former-commit-id: 6dd1571b17cffa8bf081064305a677cdc5eb58bd [formerly 8df7596130db2ac65d158be0e8cf593ec0242730] [formerly eb3b30c8beff6621b2e734bddcb4e2c365c80435 [formerly 414ad6f0ad]]
Former-commit-id: da4fae69a9dbdf7ddc22429e33a0b31c0762d5ec [formerly a242f45b3317a8b407c0528fc5b5deee3dfcacda]
Former-commit-id: 515589cea8253eeec40d233d4da25c870402614b
2016-02-08 12:16:12 -05:00

27 lines
914 B
Makefile

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