Initial fork commit
This commit is contained in:
2
templates/eula.txt
Normal file
2
templates/eula.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
# Tacos best food yadda yadda
|
||||
eula=true
|
15
templates/install-modpack.sh
Normal file
15
templates/install-modpack.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Find out where our modpack lives
|
||||
#
|
||||
# This assumes that we have no directories adjacent to the actual pack dir
|
||||
# that contain a directory called "mods"
|
||||
#
|
||||
# If that's not the case, the onus is on you to fix your shit and/or repack
|
||||
# the server zip
|
||||
#
|
||||
directory="$(find modpack/ -type d -iname "mods" -execdir pwd \; | head -n 1)"
|
||||
echo "Syncing from $directory/"
|
||||
|
||||
# Now we rsync everything from that directory here, which should set us up
|
||||
rsync -av "$directory"/ ./
|
39
templates/minecraft@.service
Normal file
39
templates/minecraft@.service
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# Licensed under the terms of the MIT license
|
||||
# Source: https://github.com/agowa338/MinecraftSystemdUnit/
|
||||
# vim:ft=dosini:
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Minecraft Server %i
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=minecraft
|
||||
Group=minecraft
|
||||
WorkingDirectory={{ minecraft_home }}/%i
|
||||
PrivateUsers=true
|
||||
ProtectSystem=full
|
||||
ProtectHome=true
|
||||
# Implies MountFlags=slave
|
||||
ProtectKernelTunables=true
|
||||
# Implies NoNewPrivileges=yes
|
||||
ProtectKernelModules=true
|
||||
# Implies MountAPIVFS=yes
|
||||
ProtectControlGroups=true
|
||||
|
||||
ExecStart=/bin/sh -c '/usr/bin/screen -DmS %i /usr/bin/java -Xms{{ minecraft_jre_xms }} -Xmx{{ minecraft_jre_xmx }} -jar server.jar nogui'
|
||||
|
||||
ExecReload=/usr/bin/screen -p 0 -S %i -X eval 'stuff "reload"\\015'
|
||||
|
||||
ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "say Server is going down: Service was stopped"\\015'
|
||||
ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "save-all"\\015'
|
||||
ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "stop"\\015'
|
||||
ExecStop=/bin/sleep 5
|
||||
|
||||
Restart=always
|
||||
# Restart after 24hrs
|
||||
RuntimeMaxSecs=86400
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user