1 ################################################################################
4 # Revision: $Revision: 1 $
5 # Description: Makefile for Devops/Web/rmc
6 # Author: Andrew@Clearscm.com
7 # Created: Mon, Jun 01, 2015 12:19:02 PM
8 # Modified: $Date: 2012/09/20 06:52:37 $
11 # (c) Copyright 2015, Audience, Inc., all rights reserved.
13 # Aside from the standard make targets, the following additional targets exist:
15 # setup: Set up rmc web app
17 ################################################################################
18 include ../../make.inc
21 HTTPCONF := /etc/httpd/conf.d
22 SERVER := $(shell hostname -s)
24 TEMPFILE := $(shell mktemp --tmpdir $(TMP) -u rmc.conf.XXXX)
27 Aside from the standard make targets, the following additional targets exist:\n\\n\
28 install: Set up rmc web app\n\
29 uninstall: Remove rmc web app\n
36 @echo -e "$(helpText)"
39 @read -p "Enter SERVER:" SERVER;\
40 echo "SERVER = $$SERVER";\
44 @read -p "Enter server name for this instance (Default: $(SERVER)):" SERVER; \
45 read -p "Enter port number for this instance (Default: $(PORT)):" PORT; \
46 $(SUDO) $(RMF) $(HTTPCONF)/rmc.conf; \
47 $(SED) "s/<SERVER>/$$SERVER/" rmc.conf > $(TEMPFILE); \
48 $(SED) "s/<PORT>/$$PORT/" $(TEMPFILE) > /tmp/rmc.conf; \
49 $(SUDO) $(RMF) $(TEMPFILE); \
50 $(SUDO) chown root.root /tmp/rmc.conf; \
51 $(SUDO) $(MV) /tmp/rmc.conf $(HTTPCONF)/rmc.conf; \
52 $(SUDO) $(SERVICE) httpd reload
55 $(SUDO) $(RMF) $(HTTPCONF)/rmc.conf
56 $(SUDO) $(SERVICE) httpd reload