blob: 0a248d37a396f8634673f2aacae7f4b5531fd0f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
PIDFILE = /tmp/test_controller.pid
LOGFILE = /tmp/test_controller.log
TACFILE = ./test_controller/server/server.tac
HTTP_PORT = 7001
RESOURCE = cpu
CREATE = 1000
start:
twistd --pidfile=$(PIDFILE) --logfile=$(LOGFILE) --python=$(TACFILE)
nodaemon:
twistd --nodaemon --python=$(TACFILE)
kill:
[ -f $(PIDFILE) ] && kill -9 $$(cat $(PIDFILE))
log:
tail -F $(LOGFILE)
restart: kill start
post:
curl -X POST http://127.0.0.1:$(HTTP_PORT)/$(RESOURCE)?pid=$(PID)
get:
curl -X GET http://127.0.0.1:$(HTTP_PORT)/$(RESOURCE)
setup:
curl -X POST http://127.0.0.1:$(HTTP_PORT)/setup?create=$(CREATE)
|