Makefile 702 B

1234567891011121314
  1. .PHONY: install
  2. install:
  3. export WD=`realpath "$$PWD/../.."`
  4. [ -n "$$WD" ] || ( echo "cannot determine path to TCMS directory" && /bin/false )
  5. [ -n "$$PERSON" ] || ( echo "Please set the PERSON environment variable before running (user to run tcms as)" && /bin/false )
  6. sed -e s/__USER__/$$PERSON/g config.json.tmpl > config.json.tmp1
  7. sed -e 's|__WD__|'$$WD'|g' config.json.tmp1 > config.json
  8. rm config.json.tmp1
  9. /bin/false
  10. sudo curl -X PUT --data-binary @config.json --unix-socket /var/run/control.unit.sock http://localhost/config
  11. .PHONY: restart
  12. restart:
  13. sudo curl -X GET --data-binary @config.json --unix-socket /var/run/control.unit.sock http://localhost/control/applications/tcms/restart