Browse Source

Merge branch 'hotfix/readme' into develop

pull/1849/head
Daniel Gibbs 7 years ago
parent
commit
6541027ff9
  1. 16
      README.md
  2. 4
      lgsm/config-default/config-lgsm/sdtdserver/_default.cfg
  3. 61
      lgsm/functions/command_backup.sh
  4. 8
      lgsm/functions/command_start.sh
  5. 2
      lgsm/functions/fix_rust.sh
  6. 7
      lgsm/functions/install_ts3db.sh
  7. 10
      lgsm/functions/mods_list.sh

16
README.md

@ -1,11 +1,13 @@
<a href="https://gameservermanagers.com"><img src="https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/images/logo/lgsm-light-full.png" alt="linux Game Server Managers" width="600" /></a>
<a href="https://linuxgsm.com"><img src="https://raw.githubusercontent.com/wiki/GameServerManagers/LinuxGSM/images/brand/colour/LinuxGSM_colour_logo_wordmark_512.png" alt="linux Game Server Managers" width="600" /></a>
[![LinuxGSM](https://github.com/GameServerManagers/LinuxGSM/blob/master/images/logo/lgsmbutton.png)](https://linuxgsm.com)
[![Build Status](https://travis-ci.org/GameServerManagers/LinuxGSM.svg?branch=master)](https://travis-ci.org/GameServerManagers/LinuxGSM)
[![Under Development](https://badge.waffle.io/GameServerManagers/LinuxGSM.svg?label=Under%20Development&title=Under%20Development)](http://waffle.io/GameServerManagers/LinuxGSM)
[![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://gameservermanagers.com/discord)
[![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord)
[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE)
[![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAA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UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/)
<a href="https://gameservermanagers.com">LinuxGSM</a> is the command line tool for quick, simple deployment and management of dedicated game servers.
<a href="https://linuxgsm.com">LinuxGSM</a> is the command line tool for quick, simple deployment and management of dedicated game servers.
<h2>Hassle-Free Dedicated Servers</h2>
Game servers traditionally are not easy to manage yourself. Admins often have to spend hours just messing around trying to get their server working. LinuxGSM is designed to be a simple as possible allowing admins to spend less time on management and more time gaming.
@ -40,11 +42,11 @@ All FAQ can be found here.
<h2>Donate</h2>
If you want to donate to the project you can via PayPal. I have had a may kind people show their support by sending me a donation. Any donations you send help cover my server costs and buy me a drink. Cheers!
<ul>
<li><a href="https://gameservermanagers.com/#donate">Donate</a></li>
<li><a href="https://linuxgsm.com/donate">Donate</a></li>
</ul>
<h2>Useful Links</h2>
<ul>
<li><a href="https://gameservermanagers.com">Homepage</a></li>
<li><a href="https://linuxgsm.com">Homepage</a></li>
<li><a href="https://github.com/GameServerManagers/LinuxGSM/wiki">Wiki</a></li>
<li><a href="https://github.com/GameServerManagers/LinuxGSM">GitHub Code</a></li>
<li><a href="https://github.com/GameServerManagers/LinuxGSM/issues">GitHub Issues</a></li>
@ -54,8 +56,8 @@ If you want to donate to the project you can via PayPal. I have had a may kind p
<h2>Social</h2>
<ul>
<li><a href="http://steamcommunity.com/groups/linuxgsm">Steam Group</a></li>
<li><a href="https://discord.gg/0i9cmXVacvXicNl7">Discord</a></li>
<li><a href="https://twitter.com/dangibbsuk">Twitter</a></li>
<li><a href="https://linuxgsm.com/discord">Discord</a></li>
<li><a href="https://twitter.com/linuxgsm">Twitter</a></li>
<li><a href="https://www.facebook.com/linuxgsm">Facebook</a></li>
<li><a href="https://plus.google.com/+Gameservermanagers1">Google+</a></li>
<ul>

4
lgsm/config-default/config-lgsm/sdtdserver/_default.cfg

@ -8,10 +8,6 @@
#### Server Settings ####
## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login
steamuser="username"
steampass='password'
## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
ip="0.0.0.0"

61
lgsm/functions/command_backup.sh

@ -112,8 +112,16 @@ fn_backup_compression(){
sleep 2
fn_print_dots "Backup (${rootdirduexbackup}) ${backupname}.tar.gz, in progress..."
fn_script_log_info "backup ${rootdirduexbackup} ${backupname}.tar.gz, in progress"
excludedir=$(realpath --relative-to="${rootdir}" "${backupdir}")
tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" ./*
excludedir=$(fn_backup_relpath)
# CHECK THAT excludedir is a valid path.
if [ ! -d "${excludedir}" ] ; then
fn_print_info_nl "Problem identifying the previous backup directory for exclusion."
fn_script_log_error "Problem identifying the previous backup directory for exclusion"
core_exit.sh
fi
tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${tmpdir}/.backup.lock" ./*
local exitcode=$?
if [ ${exitcode} -ne 0 ]; then
fn_print_fail_eol
@ -180,6 +188,55 @@ fn_backup_prune(){
fi
}
fn_backup_relpath() {
# Written by CedarLUG as a "realpath --relative-to" alternative in bash
# Populate an array of tokens initialized from the rootdir components:
declare -a rdirtoks=($(readlink -f "${rootdir}" | sed "s/\// /g"))
if [ ${#rdirtoks[@]} -eq 0 ]; then
fn_print_info_nl "Problem assessing rootdir during relative path assessment"
fn_script_log_error "Problem assessing rootdir during relative path assessment: ${rootdir}"
core_exit.sh
fi
# Populate an array of tokens initialized from the backupdir components:
declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g"))
if [ ${#bdirtoks[@]} -eq 0 ]; then
fn_print_info_nl "Problem assessing backupdir during relative path assessment"
fn_script_log_error "Problem assessing backupdir during relative path assessment: ${rootdir}"
core_exit.sh
fi
# Compare the leading entries of each array. These common elements will be clipped off
# for the relative path output.
for ((base=0; base<${#rdirtoks[@]}; base++))
do
[[ "${rdirtoks[$base]}" != "${bdirtoks[$base]}" ]] && break
done
# Next, climb out of the remaining rootdir location with updir references...
for ((x=base;x<${#rdirtoks[@]};x++))
do
echo -n "../"
done
# Climb down the remaining components of the backupdir location.
for ((x=base;x<$(( ${#bdirtoks[@]} - 1 ));x++))
do
echo -n "${bdirtoks[$x]}/"
done
# In the event there were no directories left in the backupdir above to
# traverse down, just add a newline. Otherwise at this point, there is
# one remaining directory component in the backupdir to navigate.
if (( "$base" < "${#bdirtoks[@]}" )) ; then
echo "${bdirtoks[ $(( ${#bdirtoks[@]} - 1)) ]}"
else
echo
fi
}
# Restart the server if it was stopped for the backup
fn_backup_start_server(){
if [ "${serverstopped}" == "yes" ]; then

8
lgsm/functions/command_start.sh

@ -38,6 +38,14 @@ fn_start_teamspeak3(){
fi
# Create lockfile
date > "${rootdir}/${lockselfname}"
# Accept license
if [ ! -f "${executabledir}/.ts3server_license_accepted" ]; then
fn_script_log "Accepting ts3server license: ${executabledir}/LICENSE"
fn_print_info_nl "Accepting TeamSpeak license:"
fn_print_info_nl " * ${executabledir}/LICENSE"
sleep 3
touch "${executabledir}/.ts3server_license_accepted"
fi
cd "${executabledir}"
if [ "${ts3serverpass}" == "1" ]; then
./ts3server_startscript.sh start serveradmin_password="${newpassword}" inifile="${servercfgfullpath}" > /dev/null 2>&1

2
lgsm/functions/fix_rust.sh

@ -8,4 +8,4 @@ local commandname="FIX"
local commandaction="Fix"
# Fixes: [Raknet] Server Shutting Down (Shutting Down)
export LD_LIBRARY_PATH="${systemdir}/RustDedicated_Data/Plugins/x86_64"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${systemdir}/RustDedicated_Data/Plugins/x86_64"

7
lgsm/functions/install_ts3db.sh

@ -55,6 +55,13 @@ else
fn_print_warning_nl "./${selfname} auto-install is uses sqlite. For MariaDB/MySQL use ./${selfname} install"
fi
## License
fn_script_log "Accepting ts3server license: ${executabledir}/LICENSE"
fn_print_info_nl "Accepting TeamSpeak license:"
fn_print_info_nl " * ${executabledir}/LICENSE"
sleep 3
touch "${executabledir}/.ts3server_license_accepted"
## Get privilege key
echo ""
echo "Getting privilege key"

10
lgsm/functions/mods_list.sh

@ -26,6 +26,10 @@ sourcemodscrapeurl="https://sm.alliedmods.net/smdrop/${sourcemodmversion}/source
sourcemodlatestfile="$(wget "${sourcemodscrapeurl}" -q -O -)"
sourcemoddownloadurl="https://www.sourcemod.net/latest.php?os=linux&version=${sourcemodmversion}"
sourcemodurl="${sourcemoddownloadurl}"
# Oxide
oxiderustlatestlink="$(curl -s https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | grep browser_download_url | cut -d '"' -f 4)"
oxidehurtworldlatestlink="$(curl -s https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep "Oxide.Hurtworld.zip")"
oxidesdtdlatestlink="$(curl -s https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | grep browser_download_url | cut -d '"' -f 4)"
# Define mods information (required)
@ -66,9 +70,9 @@ mod_info_advdupe2=( MOD "advdupe2" "Advanced Duplicator 2" "https://github.com/w
mod_info_darkrp=( MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/master.zip" "darkrp-master.zip" "0" "LowercaseOn" "${systemdir}/gamemodes" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Most popular gamemode" )
mod_info_darkrpmodification=( MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings" )
# Oxidemod
mod_info_rustoxide=( MOD "rustoxide" "Oxide for Rust" "https://github.com/OxideMod/Oxide/releases/download/latest/Oxide-Rust.zip" "Oxide-Rust.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-rust.1659/" "Allows for the use of plugins" )
mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "https://github.com/OxideMod/Oxide/releases/download/latest/Oxide-Hurtworld.zip" "Oxide-Hurtworld.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-hurtworld.1332/" "Allows for the use of plugins" )
mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "https://github.com/OxideMod/Oxide/releases/download/latest/Oxide-SevenDaysToDie.zip" "Oxide-SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-7-days-to-die.813/" "Allows for the use of plugins" )
mod_info_rustoxide=( MOD "rustoxide" "Oxide for Rust" "${oxiderustlatestlink}" "Oxide.Rust.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-rust.1659/" "Allows for the use of plugins" )
mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlink}" "Oxide.Hurtworld.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-hurtworld.1332/" "Allows for the use of plugins" )
mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-7-days-to-die.813/" "Allows for the use of plugins" )
# REQUIRED: Set all mods info into the global array
mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_sourcemod[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" )

Loading…
Cancel
Save