ansible-role-terraria/templates/install-server.sh

17 lines
614 B
Bash

#! /bin/sh
# Find out where our server lives
# Ideally, this won't change at all over time. @redigit please keep these
# naming conventions
directory="server/{{ terraria_version }}/Linux"
echo "Syncing from $directory/"
# Now we rsync everything from that directory here, which should set us up
rsync -av "$directory"/ ./
# I'm not sure if it's just zip being zip or if it's Redigit not packing
# them properly, but I've found that the server executables tend to not have
# the right permissions
echo "Fixing permissions on server binaries"
find -maxdepth 1 -type f -iname "terrariaserver*" -exec chmod +x {} +