1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/letsencrypt/Makefile

32 lines
938 B
Makefile
Raw Normal View History

2016-02-14 04:36:54 +03:00
ADDRESS = yourserver.com
PORT = 8003
CUR_DIR = $(shell bash -c 'pwd')
USERCUR = $(shell bash -c 'whoami')
make:
go build
install:
rm -rf jinstall
mkdir jinstall
2016-03-19 18:31:47 +03:00
cp cowyo.ssl.nginx cowyo.ssl.nginx.temp
sed -i 's/PORT/$(PORT)/g' cowyo.ssl.nginx.temp
sed -i 's/ADDRESS/$(ADDRESS)/g' cowyo.ssl.nginx.temp
sed -i 's^CUR_DIR^$(CUR_DIR)^g' cowyo.ssl.nginx.temp
cp cowyo.init cowyo.init.temp
sed -i 's/EXT_ADDRESS/$(ADDRESS)/g' cowyo.init.temp
sed -i 's^CUR_DIR^$(CUR_DIR)^g' cowyo.init.temp
sed -i 's^USERCUR^$(USERCUR)^g' cowyo.init.temp
sed -i 's^PORT^$(PORT)^g' cowyo.init.temp
cp cowyo.init.temp /etc/init.d/cowyo.init
chmod +x /etc/init.d/cowyo.init
cp cowyo.ssl.nginx.temp /etc/nginx/sites-available/cowyo.nginx
ln -fs /etc/nginx/sites-available/cowyo.nginx /etc/nginx/sites-enabled/cowyo.nginx
2016-02-14 04:36:54 +03:00
/etc/init.d/nginx reload
/etc/init.d/nginx restart
2016-03-19 18:31:47 +03:00
/etc/init.d/cowyo.init restart
2016-02-14 04:36:54 +03:00
rm -rf *.temp
.PHONY: install