mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
a7eff72b43
Former-commit-id: fcedfb6154c9bc2a80a90e027bbc69f02d755e2c [formerly 5adb4a7a303116dc002814c408a798dc86512a90] [formerly 866edb50ab438dd4123edf0761ff8445b5a84dc7 [formerly 8aa6928270d0d924753017270b4733c90ff1a01b [formerlya4680105f8
]]] Former-commit-id: 58a32e4ecb0d2131b51074b01acbbd4318a0c347 [formerly da121f68ff68d214c7bc98d5d29fc6c40ca3c6e9] Former-commit-id: 241fce62599a0f0d0fbf3f2ad036d481dd1897be Former-commit-id:992e0fe776
27 lines
912 B
Makefile
27 lines
912 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 start
|
|
rm -rf jinstall
|