1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/letsencrypt/Makefile
Zack Scholl 59955afa78 Updated and renamed
Former-commit-id: b5ac59cb19d2bc8c7a86560aca55250af5f0c13f [formerly 327bf636df25e46bda09fed20352a548d6922e3e] [formerly 207656a9b061ecd5f5def1dd0ef57e7e17d93524 [formerly 41f107c876b02912e1f8a454862f200193c9ab76 [formerly 8d4d68c840]]]
Former-commit-id: e1b78b6df1d5ce2d6d2de334bf2cda9060057558 [formerly a109361bc20bba2b4917e7b174fca02e68642169]
Former-commit-id: 8268b6f2e664d64a308bfcc0593756a96761afc6
Former-commit-id: 7e3dd5a83d
2016-03-19 11:31:47 -04:00

32 lines
938 B
Makefile

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
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
/etc/init.d/nginx reload
/etc/init.d/nginx restart
/etc/init.d/cowyo.init restart
rm -rf *.temp
.PHONY: install