File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 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
55MSCS := /usr/local/bin/mscs
66MSCS_INIT_D := /etc/init.d/mscs
77MSCS_SERVICE := /etc/systemd/system/mscs.service
8+ MSCS_SERVICE_TEMPLATE := /etc/systemd/system/mscs@.service
89MSCS_COMPLETION := /etc/bash_completion.d/mscs
910
1011UPDATE_D := $(wildcard update.d/* )
@@ -28,6 +29,7 @@ update:
2829 install -m 0644 mscs.completion $(MSCS_COMPLETION )
2930 if which systemctl; then \
3031 install -m 0644 mscs.service $(MSCS_SERVICE ) ; \
32+ install -m 0644 mscs@.service $(MSCS_SERVICE_TEMPLATE ) ; \
3133 fi
3234 @for script in $(UPDATE_D ) ; do \
3335 sh $$ script; \
@@ -36,7 +38,7 @@ update:
3638clean :
3739 if which systemctl; then \
3840 systemctl -f disable mscs.service; \
39- rm -f $(MSCS_SERVICE ) ; \
41+ rm -f $(MSCS_SERVICE ) $( MSCS_SERVICE_TEMPLATE ) ; \
4042 else \
4143 update-rc.d mscs remove; \
4244 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