|
|
@@ -1,13 +1,14 @@
|
|
|
+WD=$(shell realpath "$$PWD/../..")
|
|
|
+
|
|
|
.PHONY: install
|
|
|
install:
|
|
|
- sudo chmod 0660 /var/run/control.unit.sock
|
|
|
- export WD=`realpath "$$PWD/../.."`
|
|
|
- [ -n "$$WD" ] || ( echo "cannot determine path to TCMS directory" && /bin/false )
|
|
|
+ [ -n "$(WD)" ] || ( echo "cannot determine path to TCMS directory" && /bin/false )
|
|
|
[ -n "$$PERSON" ] || ( echo "Please set the PERSON environment variable before running (user to run tcms as)" && /bin/false )
|
|
|
+ sudo chmod 0660 /var/run/control.unit.sock
|
|
|
+ sudo chown :$$PERSON /var/run/control.unit.sock
|
|
|
sed -e s/__USER__/$$PERSON/g config.json.tmpl > config.json.tmp1
|
|
|
- sed -e 's|__WD__|'$$WD'|g' config.json.tmp1 > config.json
|
|
|
+ sed -e 's|__WD__|'$(WD)'|g' config.json.tmp1 > config.json
|
|
|
rm config.json.tmp1
|
|
|
- /bin/false
|
|
|
curl -X PUT --data-binary @config.json --unix-socket /var/run/control.unit.sock http://localhost/config
|
|
|
|
|
|
.PHONY: restart
|