mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Create Makefile
Former-commit-id: dda959fcc34f3d953a50310510e7c63332ea269e [formerly c4a7fbcf63626dddc3474b1de8f0fc9cfb984497] [formerly e8a788ead462fa8ffde79e5e221d85f7bae9bb6c [formerly 7d20c29f51
]]
Former-commit-id: cd182dd99147fa2bdf5fb18893b60e29f7c166de [formerly a512e0b430a0b04f41cda292a4665e0f27dd8537]
Former-commit-id: d69a05f0f12be6aefbb1815f687d8ba81b6ea7d5
This commit is contained in:
parent
45f43c119b
commit
b631f71942
31
letsencrypt/Makefile
Normal file
31
letsencrypt/Makefile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
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 awwkoala.ssl.nginx awwkoala.ssl.nginx.temp
|
||||||
|
sed -i 's/PORT/$(PORT)/g' awwkoala.ssl.nginx.temp
|
||||||
|
sed -i 's/ADDRESS/$(ADDRESS)/g' awwkoala.ssl.nginx.temp
|
||||||
|
sed -i 's^CUR_DIR^$(CUR_DIR)^g' awwkoala.ssl.nginx.temp
|
||||||
|
cp awwkoala.init awwkoala.init.temp
|
||||||
|
sed -i 's/EXT_ADDRESS/$(ADDRESS)/g' awwkoala.init.temp
|
||||||
|
sed -i 's^CUR_DIR^$(CUR_DIR)^g' awwkoala.init.temp
|
||||||
|
sed -i 's^USERCUR^$(USERCUR)^g' awwkoala.init.temp
|
||||||
|
sed -i 's^PORT^$(PORT)^g' awwkoala.init.temp
|
||||||
|
cp awwkoala.init.temp /etc/init.d/awwkoala.init
|
||||||
|
chmod +x /etc/init.d/awwkoala.init
|
||||||
|
cp awwkoala.ssl.nginx.temp /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 *.temp
|
||||||
|
|
||||||
|
.PHONY: install
|
Loading…
Reference in New Issue
Block a user