forked from MinecraftServerControl/mscs
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (25 loc) · 755 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (25 loc) · 755 Bytes
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
MSCS_USER := minecraft
MSCS_HOME := /opt/mscs
MSCTL := /usr/local/bin/msctl
MSCS := /usr/local/bin/mscs
MSCS_SERVICE := /etc/systemd/system/mscs.service
MSCS_COMPLETION := /etc/bash_completion.d/mscs
.PHONY: install update clean
install: update
adduser --system --group --home $(MSCS_HOME) --quiet $(MSCS_USER)
if which systemctl; then \
systemctl -f enable mscs.service; \
fi
update:
install -m 0755 msctl $(MSCTL)
install -m 0755 mscs $(MSCS)
install -m 0644 mscs.completion $(MSCS_COMPLETION)
if which systemctl; then \
install -m 0644 mscs.service $(MSCS_SERVICE); \
fi
clean:
if which systemctl; then \
systemctl -f disable mscs.service; \
rm -f $(MSCS_SERVICE); \
fi
rm -f $(MSCTL) $(MSCS) $(MSCS_SERVICE) $(MSCS_COMPLETION)