X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rmc%2FMakefile;fp=rmc%2FMakefile;h=45defaec81250d79268642a355a8e9985605664b;hb=8b59f0654d6cedeb6564480ee69acdcf0988e9ff;hp=0000000000000000000000000000000000000000;hpb=63fec67e965a0aa304ec9c0daebbc7ccae283cf2;p=clearscm.git diff --git a/rmc/Makefile b/rmc/Makefile new file mode 100644 index 0000000..45defae --- /dev/null +++ b/rmc/Makefile @@ -0,0 +1,56 @@ +################################################################################ +# +# File: Makefile +# Revision: $Revision: 1 $ +# Description: Makefile for Devops/Web/rmc +# Author: Andrew@Clearscm.com +# Created: Mon, Jun 01, 2015 12:19:02 PM +# Modified: $Date: 2012/09/20 06:52:37 $ +# Language: Makefile +# +# (c) Copyright 2015, Audience, Inc., all rights reserved. +# +# Aside from the standard make targets, the following additional targets exist: +# +# setup: Set up rmc web app +# +################################################################################ +include ../../make.inc + +WEBAPPS := rmc +HTTPCONF := /etc/httpd/conf.d +SERVER := $(shell hostname -s) +PORT := 8000 +TEMPFILE := $(shell mktemp --tmpdir $(TMP) -u rmc.conf.XXXX) + +define helpText +Aside from the standard make targets, the following additional targets exist:\n\\n\ +install: Set up rmc web app\n\ +uninstall: Remove rmc web app\n +endef + +all: + install + +help: + @echo -e "$(helpText)" + +test: + @read -p "Enter SERVER:" SERVER;\ + echo "SERVER = $$SERVER";\ + exit 1; + +install: + @read -p "Enter server name for this instance (Default: $(SERVER)):" SERVER; \ + read -p "Enter port number for this instance (Default: $(PORT)):" PORT; \ + $(SUDO) $(RMF) $(HTTPCONF)/rmc.conf; \ + $(SED) "s//$$SERVER/" rmc.conf > $(TEMPFILE); \ + $(SED) "s//$$PORT/" $(TEMPFILE) > /tmp/rmc.conf; \ + $(SUDO) $(RMF) $(TEMPFILE); \ + $(SUDO) chown root.root /tmp/rmc.conf; \ + $(SUDO) $(MV) /tmp/rmc.conf $(HTTPCONF)/rmc.conf; \ + $(SUDO) $(SERVICE) httpd reload + +uninstall: + $(SUDO) $(RMF) $(HTTPCONF)/rmc.conf + $(SUDO) $(SERVICE) httpd reload