Makefile 709 B

123456789101112131415
  1. .PHONY: install
  2. install:
  3. sudo chmod 0660 /var/run/control.unit.sock
  4. export WD=`realpath "$$PWD/../.."`
  5. [ -n "$$WD" ] || ( echo "cannot determine path to TCMS directory" && /bin/false )
  6. [ -n "$$PERSON" ] || ( echo "Please set the PERSON environment variable before running (user to run tcms as)" && /bin/false )
  7. sed -e s/__USER__/$$PERSON/g config.json.tmpl > config.json.tmp1
  8. sed -e 's|__WD__|'$$WD'|g' config.json.tmp1 > config.json
  9. rm config.json.tmp1
  10. /bin/false
  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