File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ MSCTL := /usr/local/bin/msctl
5
5
MSCS := /usr/local/bin/mscs
6
6
MSCS_INIT_D := /etc/init.d/mscs
7
7
MSCS_SERVICE := /etc/systemd/system/mscs.service
8
+ MSCS_SERVICE_TEMPLATE := /etc/systemd/system/
[email protected]
8
9
MSCS_COMPLETION := /etc/bash_completion.d/mscs
9
10
10
11
UPDATE_D := $(wildcard update.d/* )
@@ -28,6 +29,7 @@ update:
28
29
install -m 0644 mscs.completion $(MSCS_COMPLETION )
29
30
if which systemctl; then \
30
31
install -m 0644 mscs.service $(MSCS_SERVICE ) ; \
32
+ install -m 0644
[email protected] $(MSCS_SERVICE_TEMPLATE ) ; \
31
33
fi
32
34
@for script in $(UPDATE_D ) ; do \
33
35
sh $$ script; \
@@ -36,7 +38,7 @@ update:
36
38
clean :
37
39
if which systemctl; then \
38
40
systemctl -f disable mscs.service; \
39
- rm -f $(MSCS_SERVICE ) ; \
41
+ rm -f $(MSCS_SERVICE ) $( MSCS_SERVICE_TEMPLATE ) ; \
40
42
else \
41
43
update-rc.d mscs remove; \
42
44
rm -f $(MSCS_INIT_D ) ; \
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description =Minecraft Server Control Script for server %i
3
+ Documentation =https://github.com/MinecraftServerControl/mscs
4
+ Requires =network.target
5
+ After =network.target
6
+
7
+ [Service]
8
+ User =minecraft
9
+ Group =minecraft
10
+ Environment ="PATH=/usr/local/bin:/usr/bin:/bin"
11
+ ExecStart =/usr/local/bin/mscs start %i
12
+ ExecStop =/usr/local/bin/mscs stop %i
13
+ ExecReload =/usr/local/bin/mscs restart %i
14
+ Type =oneshot
15
+ RemainAfterExit =yes
16
+
17
+ [Install]
18
+ WantedBy =multi-user.target
You can’t perform that action at this time.
0 commit comments