Makefile 748 B

12345678910111213141516
  1. WD=$(shell realpath "$$PWD/../..")
  2. .PHONY: install
  3. install:
  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. sudo chmod 0660 /var/run/control.unit.sock
  7. sudo chown :$$PERSON /var/run/control.unit.sock
  8. sed -e s/__USER__/$$PERSON/g config.json.tmpl > config.json.tmp1
  9. sed -e 's|__WD__|'$(WD)'|g' config.json.tmp1 > config.json
  10. rm config.json.tmp1
  11. curl -X PUT --data-binary @config.json --unix-socket /var/run/control.unit.sock http://localhost/config
  12. .PHONY: restart
  13. restart:
  14. curl -X GET --unix-socket /var/run/control.unit.sock http://localhost/control/applications/tcms/restart