-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
66 lines (50 loc) · 1.81 KB
/
Makefile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# SERVER COMMANDS
start-server:
poetry run gunicorn -w 2 -k sunflower.core.worker.SunflowerWorker \
--bind unix:/tmp/sunflower.gunicorn.sock \
--daemon \
--pid /tmp/sunflower.server.pid \
--access-logfile /tmp/sunflower.access.log \
--error-logfile /tmp/sunflower.error.log \
--forwarded-allow-ips='*' \
--capture-output \
server.server:app
@echo "Logs and socket are in /tmp"
stop-server:
pkill --pidfile /tmp/sunflower.server.pid
restart-server: stop-server start-server
# LIQUIDSOAP
start-liquidsoap:
liquidsoap ~/radio/sunflower.liq & echo $$! > /tmp/sunflower.liquidsoap.pid & disown
stop-liquidsoap:
pkill --pidfile /tmp/sunflower.liquidsoap.pid
restart-liquidsoap: stop-liquidsoap start-liquidsoap
console-liquidsoap:
telnet localhost 1234
# SCHEDULER
start-scheduler:
poetry run python sunflower/scheduler.py & echo $$! > /tmp/sunflower.scheduler.pid & disown
stop-scheduler:
pkill --pidfile /tmp/sunflower.scheduler.pid
restart-scheduler: stop-scheduler start-scheduler
# ALIASES
starts: start-server
stops: stop-server
startl: start-liquidsoap
stopl: stop-liquidsoap
restartl: restart-liquidsoap
startr: start-scheduler
stopr: stop-scheduler
restartr: restart-scheduler
# HELP
help:
@echo "start-server, starts Start the API server"
@echo "stop-server, stops Stop the API server"
@echo "restart-server, restarts Restart the API server"
@echo "start-liquidsoap, startl Start Liquidsoap"
@echo "stop-liquidsoap, stopl Stop Liquidsoap"
@echo "restart-liquidsoap, restartl Restart Liquidsoap"
@echo "console-liquidsoap, consolel Start a telnet session with Liqudsoap"
@echo "start-scheduler, startr Start the radio scheduler"
@echo "stop-scheduler, stopr Stop the radio scheduler"
@echo "restart-scheduler, restartr Restart the radio scheduler"