-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (55 loc) · 1.12 KB
/
Makefile
File metadata and controls
72 lines (55 loc) · 1.12 KB
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
67
68
69
70
71
72
all: check
check: syntax pylint pycodestyle
syntax:
python3 -m py_compile niced
rm -rf __pycache__
pylint:
pylint niced
pycodestyle:
pycodestyle niced
run:
sudo ./niced --config-file ./niced.conf
man:
man ./niced.8
install:
ifneq ($(shell id -u), 0)
sudo make $@
else
mkdir -p /usr/bin
cp niced /usr/bin/
mkdir -p /etc/systemd/system
cp niced.service /lib/systemd/system/
mkdir -p /etc
cp --update=none niced.conf /etc/
mkdir -p /usr/share/man/man8/
cp niced.8 /usr/share/man/man8/
systemctl daemon-reload
endif
uninstall:
ifneq ($(shell id -u), 0)
sudo make $@
else
rm -f /usr/bin/niced
rm -f /lib/systemd/system/niced.service
endif
remove: uninstall
purge: uninstall
ifneq ($(shell id -u), 0)
sudo make $@
else
rm -f /etc/niced.conf
endif
service_status:
sudo systemctl status niced.service
service_enable:
sudo systemctl enable niced.service
service_disable:
sudo systemctl disable niced.service
service_start:
sudo systemctl start niced.service
service_stop:
sudo systemctl stop niced.service
service_restart:
sudo systemctl restart niced.service
service_logs:
sudo journalctl -u niced.service -b