From df5b2824690a9fd7cdad7de7b3e025858db09d7d Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Mon, 8 Feb 2016 12:34:06 -0500 Subject: [PATCH] Added makefile Former-commit-id: 29e2e80bb4a1a5b2a17f95ef289f59dc42e0b551 [formerly 106388272c4de662e074b0a9b3e1647840087469] [formerly c3c4a7cac5642ed57afa1ad7dd5e5d48e56e76b4 [formerly da82a40ffdf918c1f5753fe14af00bc106fbc6f9]] Former-commit-id: 575dcebbfc6b432242f8b2effd353d1a46146758 [formerly 2bc14c293430d023c85f099816d38696e0d8569d] Former-commit-id: 9bc0641eddccb6a2787fd4e3be1ef38924bc0457 --- Makefile | 6 +++++- install/cowyo.init | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c4a2293..64c6d66 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,10 @@ PORT = 8001 CUR_DIR = $(shell bash -c 'pwd') USERCUR = $(shell bash -c 'whoami') -all: +make: + go build + +install: rm -rf jinstall mkdir jinstall cp install/cowyo.nginx jinstall/cowyo.nginx @@ -15,6 +18,7 @@ all: 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 + sed -i 's^PORT^$(PORT)^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 diff --git a/install/cowyo.init b/install/cowyo.init index 452d151..146c7a7 100644 --- a/install/cowyo.init +++ b/install/cowyo.init @@ -6,7 +6,7 @@ dir="CUR_DIR" user="USERCUR" -cmd="./cowyo EXT_ADDRESS" +cmd="./cowyo -p :PORT EXT_ADDRESS" name="cowyo" pid_file="/var/run/$name.pid"