Skip to content

Updates to the start.sh scripts for sub servers #4

Open
@nathen418

Description

@nathen418

add a rsync line to the start script for the sub server templates. This would be an easy way to update the plugin jars of each sub server before it starts every time. This can also be used to keep the server jar up to date with a wget call to the paper API or another rsync line to sync the server jars. This is not a good solution in the long term as this will cause lots of writes to the drive. A better solution would be to look at a jar downloaded in the past week and compare it to the md5 checksum of the jar currently in the sub server folder.

#1/bin/bash
echo "syncing plugin folder"
rsync -aP --delete {template_path}/plugins/ {server_path}/plugins/
echo "Syncing server jar"
rsync -aP --delete {latest_server_jar_path}/ {server_path}/

echo "Starting server screen"
screen -d -m -S {server_name_here} bash -c 'java -jar paper_latest.jar'
echo "Screen Started"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions